AploSec / Disclosures / CVE-2026-110642
xhtml2pdf before 0.2.19 OS Command Injection via startViewer File Name
CVE-2026-110642 · published 2026-10-14
In plain words: this type of bug lets someone run their own commands on the server (command injection). A fixed release is listed.
Summary
CVE-2026-110642 affects xhtml2pdf (PyPI) < 0.2.19: Command injection via startViewer File Name (CWE-78). Fixed in 0.2.19. CVSS 4.0 base score 8.5 (High), assigned by VulnCheck. Published 2026-10-14 by VulnCheck. Credit: Zachariah Mithani.
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. Releases in the affected range (< 0.2.19) are vulnerable. See the linked advisory for details on affected release lines.
Timeline
- 2026-10-14 CVE published
- 2026-10-28 Public record last updated
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
- NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-110642
- Fix commithttps://github.com/xhtml2pdf/xhtml2pdf/commit/f86380dad15b3a6810201d08755a3ee6b19d5063
- Severity
- High 8.5CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- xhtml2pdf
- Ecosystem
- PyPI
- Affected
- < 0.2.19
- Fixed
- 0.2.19
- Weakness
- CWE-78
- CNA
- VulnCheck
- Credit
- Zachariah Mithanifinder