Skip to main content

PDF::WebKit EUVDEUVD-2026-57696

| CVE-2026-17431 MEDIUM
OS Command Injection (CWE-78)
2026-08-12 CPANSec GHSA-56v3-4wcg-g28h
6.1
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted pipe-flanked path via application input
  2. Delivery
    Application forwards unsanitized value to PDF::WebKit
  3. Exploit
    `to_pdf` assigns path to @ARGV and calls diamond operator
  4. Execution
    Perl 2-arg open() interprets metacharacter as shell invocation
  5. Persist
    OS command executes under process UID
  6. Impact
    Exfiltrate output or overwrite filesystem files

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a calling application to forward untrusted input - from a user, HTTP request, API parameter, or external data source - without sanitization as the output_path argument to to_pdf or to_file, or as an element of the stylesheets array processed by _style_tag_for. There is no code path reachable without going through an application layer that misuses the library. For the stylesheet vector, injection is only possible when the PDF source is HTML; URL-sourced and file-sourced invocations do not pass stylesheets through the vulnerable function, exposing only the output path vector. Exploitation is bounded by the process UID of the Perl interpreter - no inherent privilege escalation beyond that level. With the cmd | pipe form, the injected command's stdout is returned in place of the PDF; with the > path form, the named file is silently truncated. Applications that generate output paths internally (e.g., using File::Temp) and never accept user-controlled path arguments are not affected by this vulnerability.

Impact

The provided CVSS 3.1 score of 6.1 with vector AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N is conservative. The AV:L (local) classification reflects the library nature of the component, but in typical deployments where PDF::WebKit is invoked by a web application that forwards user-supplied filenames, the effective attack vector is network-reachable - making the real-world risk materially higher than the base score indicates. The I:H rating is well-justified: successful exploitation yields arbitrary command execution under the process UID, and depending on the privilege level of the web server process, this can escalate to full host compromise. No EPSS score was provided in the intelligence data, preventing quantitative exploitation probability assessment. The vulnerability is absent from CISA KEV, suggesting no confirmed widespread exploitation to date. Attack complexity is genuinely low once path control is achieved - the Perl metacharacter behavior is predictable and requires no special knowledge or tooling. The primary real-world barrier is application-level: only callers that forward unsanitized user input to these functions are exploitable, meaning applications that generate paths internally (e.g., via File::Temp) are unaffected.

Exploit ScenarioDerived

An attacker submits a crafted string such as id > /tmp/pwned | as a filename via a web application PDF generation endpoint that forwards it unsanitized as the output path to PDF::WebKit's to_pdf. Perl's 2-arg open() interprets the trailing pipe and executes id > /tmp/pwned under the web server's UID, writing command output to disk. No public exploit code was confirmed at time of analysis, but the underlying Perl metacharacter behavior is well-documented and the construction requires no special tooling.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 13, 2026

OS command injection in PDF::WebKit for Perl (versions through 1.2) allows arbitrary command execution under the process UID when untrusted input is forwarded as an output path or stylesheet path to to_pdf, to_file, or _style_tag_for. The root cause is Perl's 2-arg open() combined with the diamond operator, which interprets pipe-flanked strings (| cmd or cmd |) as shell commands and redirect-prefixed strings (> path) as file write operations rather than filenames. No public exploit code has been confirmed and the vulnerability is not listed in CISA KEV at time of analysis, but the technique exploits well-documented Perl behavior making reproduction trivial for any developer familiar with the language.

RemediationAI

Apply the CPANSec patch for PDF::WebKit 1.2 available at https://security.metacpan.org/patches/P/PDF-WebKit/1.2/CVE-2026-17431-r1.patch - no specific patched release version number was independently confirmed in the available data, so monitor the CPAN distribution at https://metacpan.org/ for a formal updated release. As a compensating control until a patched release is available, sanitize all path arguments before passing them to to_pdf, to_file, or _style_tag_for: reject any value containing a leading or trailing pipe character (|) or a leading > or >> using an explicit denylist, or preferably apply an allowlist permitting only safe filesystem path characters. Generate output paths internally using File::Temp rather than accepting them from user input, which eliminates the output path injection vector entirely. Restrict the UID of the process running PDF::WebKit to the minimum necessary privilege level to limit blast radius if injection occurs. For stylesheet injection specifically, resolve stylesheet references to pre-approved absolute paths at the application layer rather than forwarding raw user input.

Affected VersionsENISA

PDF::WebKit 0 ≤1.2

Affected Packages

euvd pdf_webkit no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PDF::WebKit (CPE: cpe:2.3:a:mithaldu:pdf::webkit:*:*:*:*:*:*:*:*) is a Perl CPAN module wrapping the wkhtmltopdf HTML-to-PDF renderer - notably, wkhtmltopdf itself is archived and unmaintained per its own status page (https://wkhtmltopdf.org/status.html), adding an upstream maintenance concern. The vulnerability is a textbook CWE-78 (Improper Neutralization of Special Elements Used in an OS Command) caused by misuse of Perl's 2-arg open(). The to_pdf function assigns the output path to @ARGV and reads it with the diamond operator (<>), which internally calls 2-arg open() on each element; _style_tag_for does the same for each stylesheet path. In Perl, 2-arg open() performs shell metacharacter expansion: a value ending with | spawns a read pipe to a command (returning its stdout in place of file content), a value beginning with | spawns a write pipe, and > or >> prefixes open the named file for write or append. The canonical fix is to replace 2-arg open() with 3-arg open(my $fh, '<', $path) or sysopen(), which treat the path as a literal filename with no metacharacter interpretation.

Know when Pdf gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 6.1 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
vuln.today AI 8.2 HIGH

AV:N reflects worst-case deployment in web applications where network-supplied input reaches path arguments; PR:N and UI:N because the attacker's HTTP request alone triggers exploitation without requiring any local access or victim interaction.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
None

Lifecycle Timeline

3
CVSS changed
Aug 13, 2026 - 13:22 NVD
6.1 (MEDIUM)
CVE Published
Aug 12, 2026 - 23:12 cve.org
UNKNOWN (no severity yet)
CVE Published
Aug 12, 2026 - 23:12 cve.org
MEDIUM 6.1

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.7%
Top 51% exploitable
Prevalence
Low
niche Perl CPAN module, limited enterprise production footprint
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

More in Pdf

View all
CVE-2026-16770 CRITICAL
9.8 Aug 12

Argument injection in PDF::WebKit through version 1.2 (Perl module, CPE mithaldu:pdf::webkit) lets an attacker who contr

CVE-2017-15257 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15253 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15252 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15251 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15249 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15248 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15246 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15242 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15262 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to execute arbitrary code or cause a denial

CVE-2017-15260 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to cause a denial of service or possibly ha

CVE-2017-15259 HIGH
7.8 Oct 11

IrfanView version 4.44 (32bit) with PDF plugin version 4.43 allows attackers to cause a denial of service or possibly ha

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy