Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI (CVE-2026-56722)

0
Medium
Published: 07/22/2026 (07/22/2026, 21:30:01 UTC)
Source: GCVE Database
Product: dompdf/dompdf

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Affected software

Packagistghsa
dompdf/dompdf
Affected versions
<3.1.6

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

AILast updated: 07/22/2026, 23:39:05 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses