All reports
High

xhtml2pdf: xhtml2pdf: Arbitrary command execution via crafted file names

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-110642

Probability of exploitation in the next 30 days: 1.13%

FIRST EPSS · 2026-11-22

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.

A flaw was found in xhtml2pdf. This vulnerability allows an attacker to execute arbitrary commands by convincing a user to process a file with a specially crafted name while using the viewer option. Because the software fails to properly sanitize the file name before passing it to the operating system, the injected commands run with the permissions of the user executing the tool.