CVE-2026-16770: CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') in MITHALDU PDF::WebKit
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.
AI Analysis
Technical Summary
CVE-2026-16770 is an argument injection vulnerability in PDF::WebKit (<=1.2) for Perl. The constructor processes <meta name="pdf-webkit-KEY" content="VALUE"> tags in HTML document heads and converts them into wkhtmltopdf command-line options. The KEY is normalized to match --[a-z0-9-]+ but is not restricted to an allow list, and VALUE is passed without sanitization. This allows an attacker controlling the HTML source to inject or override command-line arguments, including sensitive options like --enable-local-file-access and --cookie-jar. The renderer executes with an argument list, so this is argument injection rather than shell injection. URL sources are not scanned, and scanning is skipped if XML::LibXML is not installed.
Potential Impact
An attacker who can supply untrusted HTML to PDF::WebKit can influence the command-line options passed to wkhtmltopdf, potentially enabling features that access local files or manipulate cookies. This could lead to unauthorized file reads or writes depending on the options injected. The vulnerability does not affect URL sources and requires the presence of XML::LibXML for scanning. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid rendering untrusted HTML content with PDF::WebKit or ensure that meta tags cannot be controlled by untrusted sources. Consider disabling or restricting the use of XML::LibXML to prevent meta tag scanning if feasible, as scanning is skipped without it.
CVE-2026-16770: CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') in MITHALDU PDF::WebKit
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.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-16770 is an argument injection vulnerability in PDF::WebKit (<=1.2) for Perl. The constructor processes <meta name="pdf-webkit-KEY" content="VALUE"> tags in HTML document heads and converts them into wkhtmltopdf command-line options. The KEY is normalized to match --[a-z0-9-]+ but is not restricted to an allow list, and VALUE is passed without sanitization. This allows an attacker controlling the HTML source to inject or override command-line arguments, including sensitive options like --enable-local-file-access and --cookie-jar. The renderer executes with an argument list, so this is argument injection rather than shell injection. URL sources are not scanned, and scanning is skipped if XML::LibXML is not installed.
Potential Impact
An attacker who can supply untrusted HTML to PDF::WebKit can influence the command-line options passed to wkhtmltopdf, potentially enabling features that access local files or manipulate cookies. This could lead to unauthorized file reads or writes depending on the options injected. The vulnerability does not affect URL sources and requires the presence of XML::LibXML for scanning. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid rendering untrusted HTML content with PDF::WebKit or ensure that meta tags cannot be controlled by untrusted sources. Consider disabling or restricting the use of XML::LibXML to prevent meta tag scanning if feasible, as scanning is skipped without it.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-07-23T16:18:40.709Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7d0145bf8831d539509f6a
Added to database: 08/12/2026, 23:27:01 UTC
Last enriched: 08/12/2026, 23:45:17 UTC
Last updated: 08/13/2026, 01:58:27 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.