← Back to CVE Explorer

CVE-2026-16770

Full vulnerability record from the local CVENow database.

Description

PDF::WebKit versions through 1.2 for Perl allow argument injection into wkhtmltopdf via meta tags in the source document. For an HTML string or file source, the constructor collects every <meta name="pdf-webkit-KEY" content="VALUE"> element in the document head through _pdf_webkit_meta_tags and turns each one into a wkhtmltopdf command line option. KEY is normalized to an option name matching --[a-z0-9-]+ but is not checked against an allow list, VALUE is passed through unchanged as the argument that follows it, and a VALUE of "yes" emits the option as a bare flag. BUILD merges the meta derived options last, so they also override the module defaults and the options passed to new. Switches such as --enable-local-file-access and --cookie-jar are reachable this way. The renderer is executed with an argument list rather than a shell command, so this is argument injection and not shell injection. Any caller that renders untrusted HTML lets the document choose the renderer's options and override those set by the application, including options that read local files into the resulting PDF or write to a chosen path. A URL source is not scanned, and the scan is skipped when XML::LibXML, a recommended dependency, is not installed.

Severity
CRITICAL
CVSS score
9.8 (v3.1)
Vulnerability status
Deferred
Source identifier
9b29abf9-4ab0-4765-b253-1875cd9b441e
Published
2026-08-13 00:17:31.763000
Last modified
2026-10-23 19:10:00.167000
View original CVE JSON
{
  "id": "CVE-2026-16770",
  "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
  "published": "2026-08-13T00:17:31.763",
  "lastModified": "2026-10-23T19:10:00.167",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "PDF::WebKit versions through 1.2 for Perl allow argument injection into wkhtmltopdf via meta tags in the source document.\n\nFor an HTML string or file source, the constructor collects every <meta name=\"pdf-webkit-KEY\" content=\"VALUE\"> element in the document head through _pdf_webkit_meta_tags and turns each one into a wkhtmltopdf command line option. KEY is normalized to an option name matching --[a-z0-9-]+ but is not checked against an allow list, VALUE is passed through unchanged as the argument that follows it, and a VALUE of \"yes\" emits the option as a bare flag. BUILD merges the meta derived options last, so they also override the module defaults and the options passed to new. Switches such as --enable-local-file-access and --cookie-jar are reachable this way. The renderer is executed with an argument list rather than a shell command, so this is argument injection and not shell injection.\n\nAny caller that renders untrusted HTML lets the document choose the renderer's options and override those set by the application, including options that read local files into the resulting PDF or write to a chosen path. A URL source is not scanned, and the scan is skipped when XML::LibXML, a recommended dependency, is not installed."
    },
    {
      "lang": "es",
      "value": "Las versiones de PDF::WebKit hasta la 1.2 para Perl permiten la inyección de argumentos en wkhtmltopdf a través de metaetiquetas en el documento fuente.\n\nPara una cadena HTML o una fuente de archivo, el constructor recopila cada elemento <meta name=’pdf-webkit-KEY’ content=’VALUE’> en el encabezado del documento a través de _pdf_webkit_meta_tags y convierte cada uno en una opción de línea de comandos de wkhtmltopdf. KEY se normaliza a un nombre de opción que coincide con --[a-z0-9-]+ pero no se verifica contra una lista de permitidos, VALUE se pasa sin cambios como el argumento que lo sigue, y un VALUE de ’yes’ emite la opción como una bandera simple. BUILD fusiona las opciones derivadas de meta al final, por lo que también anulan los valores predeterminados del módulo y las opciones pasadas a new. Interruptores como --enable-local-file-access y --cookie-jar son accesibles de esta manera. El renderizador se ejecuta con una lista de argumentos en lugar de un comando de shell, por lo que esto es inyección de argumentos y no inyección de shell.\n\nCualquier llamador que renderice HTML no confiable permite que el documento elija las opciones del renderizador y anule las establecidas por la aplicación, incluyendo opciones que leen archivos locales en el PDF resultante o escriben en una ruta elegida. Una fuente URL no se escanea, y el escaneo se omite cuando XML::LibXML, una dependencia recomendada, no está instalado."
    }
  ],
  "affected": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "affectedData": [
        {
          "vendor": "MITHALDU",
          "product": "PDF::WebKit",
          "defaultStatus": "unaffected",
          "collectionURL": "https://cpan.org/modules",
          "packageName": "PDF-WebKit",
          "programFiles": [
            "lib/PDF/WebKit.pm"
          ],
          "programRoutines": [
            {
              "name": "PDF::WebKit::BUILD"
            },
            {
              "name": "PDF::WebKit::_find_options_in_meta"
            },
            {
              "name": "PDF::WebKit::_pdf_webkit_meta_tags"
            }
          ],
          "repo": "https://github.com/kingpong/perl-PDF-WebKit",
          "versions": [
            {
              "version": "0",
              "lessThanOrEqual": "1.2",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
          "baseScore": 9.8,
          "baseSeverity": "CRITICAL",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 5.9
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-08-13T13:08:14.277268Z",
          "id": "CVE-2026-16770",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-88"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/kingpong/perl-PDF-WebKit/issues/9",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://security.metacpan.org/patches/P/PDF-WebKit/1.2/CVE-2026-16770-r1.patch",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://wkhtmltopdf.org/status.html",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "http://www.openwall.com/lists/oss-security/2026/08/13/2",
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    }
  ]
}