ZeroHour

CVE-2026-55554

PoC

Chroot Escape Local File Read in Dompdf 3.15 and Earlier

CVSS 4.0
2.3 low
EPSS
<1%p26
Published
()
Modified
AI analysis

Dompdf versions 3.15 and prior contain a flaw in the validateLocalUri() method, where chroot boundaries are enforced with a strpos() prefix check after realpath() normalization. Because normalization strips the trailing separator from the chroot path, the check accepts any path whose string begins with the chroot characters, so a chroot of /var/www also permits access to sibling directories such as /var/www2 or /var/www_backup. An attacker who controls part of the HTML being rendered to PDF can trigger the flawed check and read files outside the intended chroot directory. Only PHP applications using dompdf 3.15 or earlier that render attacker-controlled content referencing local file paths are affected. There is no evidence of in-the-wild exploitation; a public security advisory (GHSA-wvh6-f5jh-8gw4) is available and EPSS estimates a low 0.3% chance of exploitation in the next 30 days.

What to do: Upgrade dompdf to version 3.16, which corrects the chroot boundary check. If upgrading is not immediately possible, avoid rendering attacker-controlled HTML that references local file URIs, or verify that resolved local paths fall within the configured chroot with a proper directory-boundary check. Audit PHP applications and Composer dependencies for dompdf usage and confirm which deployments pass untrusted user input into PDF generation.

Affected
dompdf project dompdf3.15 and prior (fixed in 3.16)
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, the validateLocalUri() method enforces chroot boundaries with a strpos() prefix check after normalizing paths with realpath() . Because normalization strips the trailing directory separator from $chrootPath , the check only verifies that $chrootPath is a string prefix of $realfile, so a chroot of /var/www also matches sibling directories like /var/www2 , /var/www-admin, or /var/www_backup. An attacker who controls part of the rendered HTML could exploit this to escape the chroot and read sensitive files outside the allowed directory. This issue has been fixed in version 3.16.

Vendors
dompdf project
Products
dompdf
Weakness
CWE-20
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.