CVE-2026-110642
7.8HighPublished 14 Oct 2026 · NVD status: Deferred · AI triage by gemini-3.8-flash
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
- Impact
- Full C/I/A compromise
- Weakness
- CWE-78
Impact
Attackers can execute arbitrary OS commands as the local user if they trick someone into processing a maliciously named file. This requires the user to run the pisa tool with the -s or --start-viewer flag.
Root cause
The pisa.startViewer() function interpolates unescaped file names directly into an os.system call.
Affected systems
xhtml2pdf before 0.2.19
CVSS v3.1 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Fix & remediation
Upgrade xhtml2pdf to version 0.2.19 or higher. As an interim mitigation, do not use the -s or --start-viewer CLI flags.
$ pip install --upgrade 'xhtml2pdf>=0.2.19'AI-suggested. Run it in staging first and check it against the vendor advisory. Why?
NVD 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.
References
- https://github.com/xhtml2pdf/xhtml2pdf/blob/v0.2.18/xhtml2pdf/pisa.py#L393-L400
- https://github.com/xhtml2pdf/xhtml2pdf/commit/f86380dad15b3a6810201d08755a3ee6b19d5063
- https://github.com/xhtml2pdf/xhtml2pdf/pull/835
- https://github.com/xhtml2pdf/xhtml2pdf/releases/tag/v0.2.19
- https://www.vulncheck.com/advisories/xhtml2pdf-before-0.2.19-os-command-injection-via-startviewer-file-name