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.
Published: 2026-07-28
Score: 2.3 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw lies in the validateLocalUri() method of the Dompdf HTML to PDF converter, which incorrectly checks chroot boundaries by using a prefix comparison after path normalization. Because the trailing directory separator is removed during realpath() resolution, the check accepts sibling directories such as /var/www2 or /var/www-admin as if they were inside /var/www. An attacker who can embed HTML that is processed by Dompdf can therefore load files outside the intended chroot, reading sensitive server data. This is a classic unchecked input weakness classified as CWE‑20, leading to a confidentiality breach.

Affected Systems

The vulnerability affects the Dompdf library version 3.15 and earlier, as used in PHP applications that generate PDFs from user‑supplied HTML. All deployments of these versions that rely on the validateLocalUri() check are potentially impacted; the issue was fixed in release 3.16.

Risk and Exploitability

The CVSS score of 2.3 indicates a low severity, and the EPSS score of less than 1 % suggests a minimal likelihood of exploitation. The flaw is not listed in CISA’s KEV catalog. Exploitation would require the attacker to supply HTML input that is rendered by Dompdf, so it is limited to environments where user content is trusted or not properly sanitised. In such contexts, the vulnerability could allow a local attacker to read arbitrary files inside the server filesystem beyond the configured chroot.

Generated by OpenCVE AI on August 3, 2026 at 14:28 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Dompdf to version 3.16 or later, which removes the erroneous chroot check.
  • If upgrading is not immediately possible, restrict the content that is passed to Dompdf by sanitising or validating HTML to ensure no malicious paths can be injected.
  • Apply file‑system level permissions to deny read access to sensitive files for the user executing the PHP process, limiting the impact even if the path bypass is successful.

Generated by OpenCVE AI on August 3, 2026 at 14:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-wvh6-f5jh-8gw4 Dompdf: Chroot Validation Bypass
History

Wed, 29 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 28 Jul 2026 22:00:00 +0000

Type Values Removed Values Added
First Time appeared Dompdf
Dompdf dompdf
Vendors & Products Dompdf
Dompdf dompdf

Tue, 28 Jul 2026 20:00:00 +0000

Type Values Removed Values Added
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.
Title Dompdf: Chroot Validation Bypass
Weaknesses CWE-20
References
Metrics cvssV4_0

{'score': 2.3, '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'}


Subscriptions

Dompdf Dompdf
Dompdf Project Dompdf
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-29T15:24:54.517Z

Reserved: 2026-06-16T23:11:20.213Z

Link: CVE-2026-55554

cve-icon Vulnrichment

Updated: 2026-07-29T13:23:45.852Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-28T20:17:26.723

Modified: 2026-08-05T16:37:42.623

Link: CVE-2026-55554

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T14:30:18Z

Weaknesses
  • CWE-20

    Improper Input Validation