AploSec / Disclosures / CVE-2026-110642
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
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/xhtml2pdf-before-0.2.19-os-command-injection-via-startviewer-file-name
- Fix pull requesthttps://github.com/xhtml2pdf/xhtml2pdf/pull/835
- Vulnerable codehttps://github.com/xhtml2pdf/xhtml2pdf/blob/v0.2.18/xhtml2pdf/pisa.py#L393-L400
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-110642
- Package
- xhtml2pdf
- Ecosystem
- PyPI
- Weekly downloads
- 884k
- Affected
- < 0.2.19
- Fixed
- 0.2.19
- Weakness
- CWE-78
- CNA
- VulnCheck
- Credit
- Zachariah Mithani