Description
Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.
Published: 2026-07-28
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Dompdf, an HTML to PDF converter for PHP, contains a flaw that allows an attacker who can supply input HTML to read arbitrary files from the server’s filesystem. The vulnerability arises when an SVG image is supplied via a data: URI. Dompdf processes the SVG twice; the second pass does not enforce the same file‑path validation as the first. The separate php-svg-lib library invoked during rendering has no awareness of the chroot directory, blocks only the phar:// scheme, and ultimately reads the referenced file without path or protocol validation. This enables an unauthenticated attacker to read any image file that the web process can access, potentially exposing sensitive information or compromising the environment. The flaw has been fixed in version 3.16.

Affected Systems

The issue affects the Dompdf library version 3.15 and earlier. The specific product is Dompdf (dompdf:dompdf) used in PHP applications that generate PDFs from HTML. The vulnerability is present until Dompdf 3.16, which includes the fix. No other vendors are listed.

Risk and Exploitability

The CVSS score of 6.3 indicates a medium severity local file read that could be leveraged for information disclosure. The EPSS score is below 1 %, implying very low current exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is a malicious or tampered HTML document sent to an application using Dompdf to generate PDFs, where the attacker embeds a data‑URI SVG pointing at a local file. The vulnerability can be exploited without authentication if the application renders user‑controlled HTML; if the application only processes trusted content the risk is mitigated.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Dompdf to version 3.16 or later, which validates file paths when processing SVG data‑URI images.
  • If an immediate upgrade is not possible, configure php‑svg‑lib to disable external references or ensure it does not force them, thereby preventing unvalidated file reads during rendering.
  • Sanitize or reject any data‑URI SVG images that reference local file paths before passing the input to Dompdf.

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

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-cx96-42px-69fm Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI
History

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

Type Values Removed Values Added
Metrics ssvc

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


Tue, 28 Jul 2026 21:45:00 +0000

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

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

Type Values Removed Values Added
Description Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, aAn attacker who controls the HTML input can bypass this restriction by embedding a target file path inside an SVG image delivered through a  data:  URI, because dompdf processes the SVG twice and the second pass does not enforce the same protections as the first. When rendering, dompdf hands the SVG to the separate  php-svg-lib  library with external references forced on, and that library has no knowledge of the chroot directory, blocks only the  phar://  scheme, and ultimately reads the referenced file with no path or protocol validation. This lets an external, unauthenticated attacker read arbitrary image files from the server's file system in the default configuration. This issue has been fixed in version 3.16.
Title Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI
Weaknesses CWE-20
References
Metrics cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/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-29T14:06:27.019Z

Reserved: 2026-06-22T19:17:28.958Z

Link: CVE-2026-56722

cve-icon Vulnrichment

Updated: 2026-07-29T14:06:20.770Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-28T21:17:28.587

Modified: 2026-08-04T16:39:54.863

Link: CVE-2026-56722

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-20

    Improper Input Validation