# CVE-2026-56722: Dompdf local file read via SVG data-URI bypass

Source: https://junglewise.ai/threats/cve-2026-56722-dompdf-local-file-read-via-svg-data-uri-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-28. Updated: 2026-07-28  
License: CC BY 4.0 with a link back

CVE-2026-56722 · Severity: medium · CVSS 4 · Published 2026-07-28

Dompdf is a popular PHP library used to convert HTML documents into PDF files. A security flaw allows an attacker to bypass directory restrictions and read sensitive image files from the server's filesystem by providing specially crafted HTML input. This could lead to the unauthorized exposure of private server data or user-uploaded images.

Technologies: [Dompdf](https://junglewise.ai/threats/technologies/dompdf), [dompdf/dompdf (Packagist)](https://junglewise.ai/threats/technologies/dompdf-dompdf). Vendors: [Dompdf](https://junglewise.ai/threats/vendors/dompdf), [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2026-56722 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-56722 being exploited in the wild.

**How severe is CVE-2026-56722?** Medium severity, with a CVSS score of 4, published 28 July 2026.

**Which products and versions are affected?** Dompdf < 3.1.6, <= 3.1.5; dompdf/dompdf (Packagist) < 3.1.6, ECOSYSTEM:introduced=0,fixed=3.1.6.

**Is there a fix for CVE-2026-56722?** Yes. dompdf/dompdf (Packagist): upgrade to 3.1.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-56722 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-56722?** Check whether you run Dompdf or dompdf/dompdf (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- dompdf/dompdf (Packagist): upgrade to 3.1.6 or later

  ```sh
  composer require dompdf/dompdf:^3.1.6
  ```


## Technical details

Dompdf versions 3.1.5 and prior are vulnerable to a local file read vulnerability when processing SVG images delivered via data-URIs. The root cause is a double-processing flaw: Dompdf's initial validation pass fails to correctly resolve paths within data-URI encoded SVGs, and the subsequent rendering pass hands the SVG to 'php-svg-lib' with external references forced on. Because 'php-svg-lib' lacks knowledge of Dompdf's chroot restrictions and only blocks the 'phar://' scheme, it uses 'file_get_contents()' to read any referenced file path. An unauthenticated attacker who can provide HTML input to the library can exploit this to embed arbitrary local images into the generated PDF. The issue is fixed in version 3.1.6.

## Affected products

- dompdf dompdf <= 3.1.5

## Identifiers

- CVE-2026-56722
- GHSA-cx96-42px-69fm

## Timeline

- 2026-07-20: advisory: GitHub Security Advisory GHSA-cx96-42px-69fm published
- 2026-07-20: patched: Version 3.1.6 released
- 2026-07-28: disclosed: CVE-2026-56722 published to NVD

## References

- [https://github.com/dompdf/dompdf/commit/6a58996865db05d8fede748507e50ac4b8c5bfd0](https://github.com/dompdf/dompdf/commit/6a58996865db05d8fede748507e50ac4b8c5bfd0)
- [https://github.com/dompdf/dompdf/commit/bf7b02f642e26007dedc5a22b3d6e15f9931120a](https://github.com/dompdf/dompdf/commit/bf7b02f642e26007dedc5a22b3d6e15f9931120a)
- [https://github.com/dompdf/dompdf/releases/tag/v3.1.6](https://github.com/dompdf/dompdf/releases/tag/v3.1.6)
- [https://github.com/dompdf/dompdf/security/advisories/GHSA-cx96-42px-69fm](https://github.com/dompdf/dompdf/security/advisories/GHSA-cx96-42px-69fm)

## Related threats

- [Dompdf information disclosure via SVG image references](https://junglewise.ai/threats/cve-2026-59943-dompdf-information-disclosure-via-svg-image-references)
- [Dompdf resource exhaustion Denial of Service via oversized images](https://junglewise.ai/threats/cve-2026-59942-dompdf-resource-exhaustion-denial-of-service-via-oversized-images)
- [Dompdf uncontrolled resource consumption in BMP processing](https://junglewise.ai/threats/cve-2026-59941-dompdf-uncontrolled-resource-consumption-in-bmp-processing)
- [Dompdf file existence oracle in CSS @font-face directive](https://junglewise.ai/threats/cve-2026-55555-dompdf-file-existence-oracle-in-css-font-face-directive)
- [Dompdf chroot validation bypass in validateLocalUri](https://junglewise.ai/threats/cve-2026-55554-dompdf-chroot-validation-bypass-in-validatelocaluri)
