CVE-2026-59943·PHP vulnerability
Dompdf is an HTML to PDF converter for PHP. In versions 3.15 and prior, if a malicious actor can supply unrestricted content for rendering by Dompdf they can utilize the SVG rendering functionality to leak filesystem information when rendering PDF files using image references within a data-URI encoded SVG document. Using an <image> element inside a data-URI embedded SVG, an attacker can attempt to embed other files via the href or xlink:href attributes. When processing a file that does not exist (e.g. file:///DOESNOTEXIST), dompdf behaves differently than it does when accessing a file or directory that actually exists on the filesystem. This issue has been fixed in version 3.16.
- Severity
- medium
- Software
- PHP
- Fixed in
- 3.1.6
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.26% — higher than 17% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
Until: 3.1.6
Fixed in: 3.1.6
How to fix this CVE
Update PHP and Dompdf to version 3.1.6 or later to patch an information disclosure vulnerability in the SVG rendering engine. The vulnerability allows attackers who can control PDF content to extract sensitive filesystem paths through crafted SVG documents with embedded image references. Prioritize this update if your application accepts user-supplied HTML or SVG content for PDF conversion.
sudo dnf update phpDefensia detects this vulnerability
WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block or sanitize HTTP requests containing SVG payloads with <image> elements, data-URI schemes, or file:// protocol references in POST/multipart form data intended for PDF generation. Implement content validation on user-supplied HTML before passing to Dompdf rendering functions.How to check if you are affected
- Run `php -v` to check the installed PHP version; note the version number
- Run `php -m | grep -i dom` to confirm Dompdf or DOM-related modules are loaded
- Check your application's composer.lock or vendor directory for Dompdf: `grep -r '"dompdf"' /path/to/vendor/composer.lock | grep version`
- After patching, re-run `php -v` and verify Dompdf version with `composer show dompdf` (if using Composer) to confirm the update succeeded
FAQ
What is CVE-2026-59943?
This vulnerability affects Dompdf's SVG rendering feature, allowing attackers to enumerate filesystem paths by embedding image elements with file:// URIs inside data-URI encoded SVG documents. The server's differential response when accessing existing versus non-existent files leaks directory structure information during PDF generation.
Is CVE-2026-59943 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, the attack requires only crafted SVG markup, so exploitation could occur with minimal effort once a proof-of-concept is published.
What versions of PHP/Dompdf are affected by CVE-2026-59943?
All Dompdf versions up to and including 3.1.5 are vulnerable. Version 3.1.6 and later contain the fix. The vulnerability affects any PHP installation using a vulnerable Dompdf release.
How do I check if my server is vulnerable to CVE-2026-59943?
Run `composer show dompdf` in your project root to display the installed version; if it shows 3.1.5 or earlier, your installation is vulnerable. Alternatively, check `vendor/dompdf/dompdf/VERSION` or the changelog in that directory.
Does Defensia detect CVE-2026-59943?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP and Dompdf are installed on a monitored server, CVE-2026-59943 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-59943. Free for 1 server.
Get started free