AploSec / Disclosures / CVE-2026-110642

ReproducedFixed in 0.2.19CWE-78PyPI

xhtml2pdf before 0.2.19 OS Command Injection via startViewer File Name

CVE-2026-110642 · published 2026-10-14

Summary

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.

Evidence

The exploit was run against the published artifact from the registry, not the repository. It created a marker file; a benign input through the same sink in the same session did not.

Remediation

Upgrade xhtml2pdf to 0.2.19 or later.

References

Package
xhtml2pdf
Ecosystem
PyPI
Weekly downloads
884k
Affected
< 0.2.19
Fixed
0.2.19
Weakness
CWE-78
CNA
VulnCheck
Credit
Zachariah Mithani