# 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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.95% (percentile 60, 2026-11-26)
- **CWE:** CWE-78, CWE-73
- **Published:** 2026-08-12T23:12:57.958Z
- **Modified:** 2026-10-23T19:10:00.167Z

## Who should check

- Anyone running MITHALDU PDF::WebKit \<= 1.2

## 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.

## Affected and fixed versions

- MITHALDU PDF::WebKit: \<= 1.2 (cvelist)

## Mitigation

- Vendor workaround: No fixed release is available. Apply the patch, which reads both paths with a 3-arg open so the value is never interpreted as a command or redirect.
- 
- Otherwise, do not pass untrusted input as the output path to to\_pdf or to\_file, or as an entry in the stylesheets list.
- 
- Note that the wkhtmltopdf project is no longer being developed, and users of this package should migrate to alternative solutions.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-17431. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-17431.md
Affected: MITHALDU PDF::WebKit <= 1.2
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for MITHALDU PDF::WebKit: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-17431 being exploited?

There is no confirmed exploitation: CVE-2026-17431 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.95% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-17431?

Medium: CVSS 6.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-17431?

MITHALDU PDF::WebKit \<= 1.2.

### Is there a fix for CVE-2026-17431?

No fixed version is listed in the sources yet. Vendor workaround: No fixed release is available. Apply the patch, which reads both paths with a 3-arg open so the value is never interpreted as a command or redirect.  Otherwise, do not pass untrusted input as the output path to to\_pdf or to\_file, or as an entry in the stylesheets list.  Note that the wkhtmltopdf project is no longer being developed, and users of this package should migrate to alternative solutions.

### How do I check if I'm affected by CVE-2026-17431?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://security.metacpan.org/patches/P/PDF-WebKit/1.2/CVE-2026-17431-r1.patch>
- other: <https://github.com/kingpong/perl-PDF-WebKit/issues/8>
- other: <https://wkhtmltopdf.org/status.html>
- other: <http://www.openwall.com/lists/oss-security/2026/08/13/3>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-17431>

HTML: <https://flawdb.com/CVE-2026-17431> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-17431>
