CVE-2026-17431
PDF::WebKit versions through 1.2 for Perl allow OS command injection via a 2-arg open() of the output path in to_pdf and of stylesheet paths in _style_tag_for
Description
PDF::WebKit versions through 1.2 for Perl allow OS command injection via a 2-arg open() of the output path in to_pdf and of stylesheet paths in _style_tag_for. to_pdf reads the generated PDF back from its path argument, and _style_tag_for reads each entry of the stylesheets list, by assigning the path to a local @ARGV and reading it with the diamond operator, which opens each @ARGV element with Perl's 2-arg open(). A value that begins or ends with a pipe ("| cmd", "cmd |") is run as a command rather than opened as a file, and one that begins with a redirect ("> path", ">> path") opens that path for write or append. to_file forwards its path argument to to_pdf and reaches the same read. Any caller that forwards untrusted input as the output path or as a stylesheets entry can run a command under the process UID; with the "cmd |" form the command's output is returned in place of the PDF, and with the "> path" form the named file is truncated. Stylesheets may only be added to an HTML source, so a URL or file source exposes the output path alone.
INFO
Published Date :
Aug. 13, 2026, 12:17 a.m.
Last Modified :
Aug. 13, 2026, 12:17 a.m.
Remotely Exploit :
No
Source :
9b29abf9-4ab0-4765-b253-1875cd9b441e
Affected Products
The following products are affected by CVE-2026-17431
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
No affected product recoded yet
Solution
- Update the PDF::WebKit Perl module.
- Avoid untrusted input for output paths.
- Sanitize stylesheet entries before use.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-17431.
| URL | Resource |
|---|---|
| https://github.com/kingpong/perl-PDF-WebKit/issues/8 | |
| https://security.metacpan.org/patches/P/PDF-WebKit/1.2/CVE-2026-17431-r1.patch | |
| https://wkhtmltopdf.org/status.html |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-17431 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-17431
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-17431 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-17431 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by 9b29abf9-4ab0-4765-b253-1875cd9b441e
Aug. 13, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://github.com/kingpong/perl-PDF-WebKit', 'vendor': 'MITHALDU', 'product': 'PDF::WebKit', 'versions': [{'status': 'affected', 'version': '0', 'versionType': 'custom', 'lessThanOrEqual': '1.2'}], 'packageName': 'PDF-WebKit', 'programFiles': ['lib/PDF/WebKit.pm'], 'collectionURL': 'https://cpan.org/modules', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'PDF::WebKit::to_pdf'}, {'name': 'PDF::WebKit::to_file'}, {'name': 'PDF::WebKit::_style_tag_for'}]}] Added Description PDF::WebKit versions through 1.2 for Perl allow OS command injection via a 2-arg open() of the output path in to_pdf and of stylesheet paths in _style_tag_for. to_pdf reads the generated PDF back from its path argument, and _style_tag_for reads each entry of the stylesheets list, by assigning the path to a local @ARGV and reading it with the diamond operator, which opens each @ARGV element with Perl's 2-arg open(). A value that begins or ends with a pipe ("| cmd", "cmd |") is run as a command rather than opened as a file, and one that begins with a redirect ("> path", ">> path") opens that path for write or append. to_file forwards its path argument to to_pdf and reaches the same read. Any caller that forwards untrusted input as the output path or as a stylesheets entry can run a command under the process UID; with the "cmd |" form the command's output is returned in place of the PDF, and with the "> path" form the named file is truncated. Stylesheets may only be added to an HTML source, so a URL or file source exposes the output path alone. Added CWE CWE-78 Added CWE CWE-73 Added Reference https://github.com/kingpong/perl-PDF-WebKit/issues/8 Added Reference https://security.metacpan.org/patches/P/PDF-WebKit/1.2/CVE-2026-17431-r1.patch Added Reference https://wkhtmltopdf.org/status.html