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.
Published: 2026-08-12
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability enables any caller that supplies untrusted HTML to PDF::WebKit to inject command‑line options into wkhtmltopdf via meta tags. Each <meta name="pdf-webkit-KEY" content="VALUE"> element is parsed, the key is normalized to a valid option name, and the value is forwarded unchanged, with a value of "yes" turning the option into a bare flag. This mechanism lets an attacker supply options such as --enable-local-file-access or --cookie-jar, enabling the renderer to read local files or write to arbitrary paths. Because wkhtmltopdf is executed with a directly constructed argument array, the flaw is non‑shell argument injection but provides equivalent privilege escalation or data exfiltration capabilities.

Affected Systems

Affected vendor is MITHALDU and the product is PDF::WebKit for Perl. All releases up to and including version 1.2 are impacted; no other vendors or products are affected.

Risk and Exploitability

The CVSS score is not disclosed, EPSS is unavailable, and the vulnerability is not listed in CISA's KEV catalog. Inference indicates the likely attack vector is an attacker sending crafted HTML with meta tags to override module defaults. As wkhtmltopdf runs with the privileges of the calling process, successful exploitation can lead to local file read or write, compromising confidentiality, integrity, or availability. Given that wkhtmltopdf is no longer actively maintained, the risk posture is considered high for systems rendering untrusted content.

Generated by OpenCVE AI on August 13, 2026 at 01:46 UTC.

Remediation

Vendor Workaround

No fixed release is available. Apply the patch, which restricts the options taken from meta tags to an allow list of presentational switches with checked values, extensible through the new allowed_meta_options configuration attribute, and merges them before the options passed to new rather than after. Otherwise, applications that render untrusted HTML should remove meta elements whose name attribute begins with the configured meta_tag_prefix (default "pdf-webkit-") before passing the document to new. Note that the wkhtmltopdf project is no longer being developed, and users of this package should migrate to alternative solutions.


OpenCVE Recommended Actions

  • Apply the vendor patch that restricts meta‑derived options to an allow list and merges them prior to the default options, eliminating injection.
  • If the patch cannot be applied, remove or sanitize all <meta> elements whose name begins with "pdf-webkit-" from any untrusted HTML before passing the document to PDF::WebKit.
  • Migrate to a maintained PDF rendering solution, as wkhtmltopdf and PDF::WebKit are no longer supported.

Generated by OpenCVE AI on August 13, 2026 at 01:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 13 Aug 2026 04:30:00 +0000

Type Values Removed Values Added
References

Wed, 12 Aug 2026 23:30:00 +0000

Type Values Removed Values Added
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.
Title PDF::WebKit versions through 1.2 for Perl allow argument injection into wkhtmltopdf via meta tags in the source document
Weaknesses CWE-88
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-13T02:53:49.972Z

Reserved: 2026-07-23T16:18:40.709Z

Link: CVE-2026-16770

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-13T00:17:31.763

Modified: 2026-08-13T04:17:15.670

Link: CVE-2026-16770

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T02:00:13Z

Weaknesses
  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')