Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI (CVE-2026-56722)
A vulnerability in dompdf before version 3.1.6 allows an attacker controlling HTML input to read arbitrary local files on the server by embedding file references inside SVG images encoded as data-URIs. This bypasses the intended chroot file access restrictions due to inconsistent validation between dompdf and the php-svg-lib library used for rendering SVG content. The vulnerability is exploitable remotely without authentication in the default configuration.
AI Analysis
Technical Summary
The vulnerability arises because dompdf uses a chroot mechanism to restrict local file access, but this protection is bypassed when SVG images are embedded via data-URI. dompdf validates local file URIs correctly but does not apply these checks to SVG content decoded from data-URIs. The SVG is then processed by php-svg-lib with external references allowed, which lacks chroot enforcement and calls file_get_contents() on arbitrary paths. This allows an attacker to embed an SVG referencing any local file, causing dompdf to read and embed that file into the generated PDF, effectively leaking local files outside the chroot directory.
Potential Impact
An unauthenticated attacker who can supply HTML input to dompdf can read arbitrary files on the server's filesystem, bypassing the chroot restriction. This can lead to disclosure of sensitive files such as private images or configuration files. The vulnerability affects the confidentiality of the server environment but does not indicate direct code execution or privilege escalation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict or sanitize user-supplied HTML input to prevent embedding of SVG images via data-URIs referencing local files. Consider disabling or restricting external references in SVG rendering if configurable. Monitor vendor channels for official patches or updates addressing this issue.
Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI (CVE-2026-56722)
Description
A vulnerability in dompdf before version 3.1.6 allows an attacker controlling HTML input to read arbitrary local files on the server by embedding file references inside SVG images encoded as data-URIs. This bypasses the intended chroot file access restrictions due to inconsistent validation between dompdf and the php-svg-lib library used for rendering SVG content. The vulnerability is exploitable remotely without authentication in the default configuration.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises because dompdf uses a chroot mechanism to restrict local file access, but this protection is bypassed when SVG images are embedded via data-URI. dompdf validates local file URIs correctly but does not apply these checks to SVG content decoded from data-URIs. The SVG is then processed by php-svg-lib with external references allowed, which lacks chroot enforcement and calls file_get_contents() on arbitrary paths. This allows an attacker to embed an SVG referencing any local file, causing dompdf to read and embed that file into the generated PDF, effectively leaking local files outside the chroot directory.
Potential Impact
An unauthenticated attacker who can supply HTML input to dompdf can read arbitrary files on the server's filesystem, bypassing the chroot restriction. This can lead to disclosure of sensitive files such as private images or configuration files. The vulnerability affects the confidentiality of the server environment but does not indicate direct code execution or privilege escalation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict or sanitize user-supplied HTML input to prevent embedding of SVG images via data-URIs referencing local files. Consider disabling or restricting external references in SVG rendering if configurable. Monitor vendor channels for official patches or updates addressing this issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-cx96-42px-69fm
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-56722"]
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a6150e99c2644c7f8da2332
Added to database: 07/22/2026, 23:23:21 UTC
Last enriched: 07/22/2026, 23:39:05 UTC
Last updated: 07/22/2026, 23:39:05 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.