CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

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

mediumCVE-2026-56722
Description: An attacker, who controls the HTML input supplied to dompdf, can read arbitrary images from the server’s file system, bypassing the chroot restriction. The vulnerability is exploitable in the default configuration. Exploitation conditions: An external user Researcher: Nikita Sveshnikov (Positive Technologies) Research dompdf restricts access to local files using the chroot mechanism. By default, chroot is set to the root directory of dompdf (Options.php:350-351): _Listing 1. chroot settings_ $rootDir = realpath(DIR . "/../"); $this->setChroot(array($rootDir)); // result: chroot = ["/path/to/vendor/dompdf/dompdf"] When the HTML references a local file, Options::validateLocalUri() checks that the path resides within сhroot. A direct link to the file outside this directory is correctly blocked: _Listing 2. Blocking link_ <!-- BLOCKED: /tmp/ is outside chroot --> <img src="file:///tmp/secret.png"> How the protection is bypassed: An attacker wraps the link to the target file in SVG format and delivers it via data: URI: _Listing 3. Wrapping link in SVG_ <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0i..."> Inside the base64 payload is an SVG containing the <image> element that points to the target file: _Listing 4. Pointing to the target file_ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="589" height="415"> <image xlink:href="/tmp/secret.png" x="0" y="0" width="589" height="415"/> </svg> Why the bypass works: The issue is that dompdf handles the SVG twice: first through its own validator and then via  php-svg-lib — and the second pass does not apply the protection that the first pass does. Step 1. The data:// protocol has no validation rules (Options.php:546-547): _Listing 5. Lack of rules_ case "data://": break; // no rules SVG content passes without any checks. Step 2. dompdf pre‑parses the SVG and validates the links inside it (Cache.php:137-183), but incorrectly interprets the path of an ex

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
medium
Published
2026-07-22
Last updated
2026-07-22
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-cx96-42px-69fm

Exploitation outlook

EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.

Referenced CVEs

CVECSIRTS overviewExternal
CVE-2026-56722coverage & exploitation statusNVD · CVE.org

Same CVEs, other sources

How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.

More from GitHub Security Advisories