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.
Published: 2026-10-14
Score: 8.5 High
EPSS: 1.1% Low
KEV: No
Impact: OS Command Injection
Action: Patch Immediately
AI Analysis

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.

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

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

History

Sat, 17 Oct 2026 12:00:00 +0000

Type Values Removed Values Added
First Time appeared Xhtml2pdf
Xhtml2pdf xhtml2pdf
Vendors & Products Xhtml2pdf
Xhtml2pdf xhtml2pdf

Thu, 15 Oct 2026 13:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Wed, 14 Oct 2026 14:30:00 +0000

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'}


Subscriptions

Xhtml2pdf Xhtml2pdf
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-14T18:18:52.884Z

Reserved: 2026-10-14T13:07:34.081Z

Link: CVE-2026-110642

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-14T15:17:17.627

Modified: 2026-10-15T14:47:05.720

Link: CVE-2026-110642

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-14T14:17:12Z

Links: CVE-2026-110642 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-17T11:45:06Z

Weaknesses
  • CWE-78

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