CVE-2026-110642

xhtml2pdf before 0.2.19 OS Command Injection via startViewer File Name

Published Oct 14, 2026 CVSS 4.0 · 8.5 High EPSS 1.2% KEV · Not listed
Description
xhtml2pdf before 0.2.19 contains an OS command injection vulnerability in pisa.startViewer() that allows attackers to execute commands by interpolating unescaped file names into os.system. Attackers can supply an input file whose name contains a double quote and shell metacharacters, which runs OS commands as the invoking user when the pisa tool is used with -s/--start-viewer.

Analysis

AI-generated

Technical impact

xhtml2pdf prior to 0.2.19 allows attackers to inject arbitrary operating‑system commands through the startViewer option. The vulnerability occurs because the file name supplied to --start-viewer is directly interpolated into an os.system call without proper escaping, enabling shell metacharacters and quotes to be executed. An attacker who can supply a crafted input file name can run any command as the user running the pisa tool, potentially compromising the host or deploying malware.

Affected Systems

The affected vendor is xhtml2pdf; any installation using a version earlier than 0.2.19 is vulnerable. This includes release trains 0.2.18 and earlier. The vulnerability resides in the pisa module’s startViewer function. All environments that rely on xhtml2pdf to convert HTML to PDF and invoke startViewer are impacted.

Risk and Exploitability

The CVSS v3.1 base score is 8.5, indicating high severity. The EPSS score of 1% indicates that while this vulnerability is unlikely to be widely exploited at this time, it remains possible, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is local or requires the attacker to supply a maliciously named file via the –start-viewer flag; this inference is based on the description, which does not explicitly confirm remote exploitation. Exploitation would enable arbitrary OS commands to run as the user invoking the pisa tool, as the file name is interpolated unsafely into os.system. An attacker would need filesystem access or the ability to instruct the tool to process a maliciously named file, a scenario common in automated or untrusted file processing pipelines.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update xhtml2pdf to version 0.2.19 or later, which removes the unescaped filename interpolation.
  • If immediate upgrading is not feasible, do not use the -s/--start-viewer option in any automated processing, or remove the functionality entirely.
  • When upgrading is delayed, sanitize or validate all file names passed to startViewer by stripping or escaping shell metacharacters prior to passing them to os.system.

Generated by OpenCVE AI on October 15, 2026 at 20:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Xhtml2pdf
Xhtml2pdf xhtml2pdf
Vendors & Products Xhtml2pdf
Xhtml2pdf xhtml2pdf
Type Values Removed Values Added
Description xhtml2pdf before 0.2.19 contains an OS command injection vulnerability in pisa.startViewer() that allows attackers to execute commands by interpolating unescaped file names into os.system. Attackers can supply an input file whose name contains a double quote and shell metacharacters, which runs OS commands as the invoking user when the pisa tool is used with -s/--start-viewer.
Title xhtml2pdf before 0.2.19 OS Command Injection via startViewer File Name
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 14, 2026, 6:18 PM
Reserved
Oct 14, 2026, 1:07 PM
Status
Deferred
Published
Oct 14, 2026, 3:17 PM
Modified
Oct 15, 2026, 2:47 PM
Severity
Important
Public date
Oct 14, 2026, 2:17 PM