Impact
PDF::WebKit versions up to 1.2 for Perl rely on a two-argument open when reading the output file path inside the to_pdf function and when processing stylesheet paths inside the _style_tag_for helper. The two-argument open interprets strings that begin or end with a pipe, such as `| cmd` or `cmd |`, as shell commands, and strings that begin with a redirection operator, such as `> path`, as file redirection. As a result, if an attacker supplies an untrusted value that is used as the PDF output filename or as a stylesheet entry, the module will execute the supplied command or truncate the named file, enabling remote code execution. The necessary conditions are that the caller forwards untrusted input as an output path or a stylesheet entry; no additional privileges or interaction are required. Based on the description, it is inferred that an attacker only needs to supply an untrusted value used as the PDF output filename or as a stylesheet entry to trigger command execution and potentially compromise confidentiality, integrity, or availability.
Affected Systems
Vendor MITHALDU’s Perl module PDF::WebKit is vulnerable in all releases up to and including version 1.2. The upstream wkhtmltopdf project is no longer maintained, and there is no officially released patch; however, a community patch that replaces the two-argument open with a safe three-argument form is available. Users of PDF::WebKit who rely on untrusted input for the PDF output path or stylesheet list must be aware that these versions are susceptible to OS command injection.
Risk and Exploitability
The CVSS score of 6.1 indicates moderate severity, while the EPSS score of <1% reflects a low, but nonzero, probability of exploitation. The vulnerability is not listed in the CISA KEV catalog, but the lack of an official patch release increases the risk that the flaw goes unnoticed in production. An attacker with the ability to supply a path or stylesheet entry—such as a malicious user uploading a PDF or a compromised web application—can trigger the flaw remotely, execute arbitrary shell commands, and potentially gain full system compromise. The attack does not require privileged access beyond the process UID under which the module runs, making the risk significant for services running with elevated privileges.
OpenCVE Enrichment