GHSA-cx96-42px-69fm: Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI
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
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.
- Low exploitation riskCVE-2026-567220.56% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 43% of all scored CVEs.
Referenced CVEs
| CVE | CSIRTS overview | External |
|---|---|---|
| CVE-2026-56722 | coverage & exploitation status | NVD · CVE.org |
Same CVEs, other sources
How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.
More from GitHub Security Advisories
- mediumGHSA-jr6p-8pjj-mfx6: Capsule has an incomplete fix of CVE-2026-22872: TenantResource RawItems and Generators s…2026-07-31
- mediumGHSA-68cj-mvg9-rgm2: Capsule: CapsuleConfiguration NodeMetadata regex fields lack webhook validation, allowing…2026-07-31
- mediumGHSA-ff84-5f28-78qj: re2: Out-of-bounds heap read in `exec`/`test`/`match` via attacker-influenced `lastIndex`…2026-07-31
- mediumGHSA-6hxr-mr5r-9836: re2: Global `String.prototype.match` with an empty-matchable pattern never advances → inf…2026-07-31
- mediumGHSA-x83g-979r-f5fh: Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII2026-07-31