medium CVSS 5.3 EPSS 0.26%

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 php

Defensia 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

  1. Run `php -v` to check the installed PHP version; note the version number
  2. Run `php -m | grep -i dom` to confirm Dompdf or DOM-related modules are loaded
  3. Check your application's composer.lock or vendor directory for Dompdf: `grep -r '"dompdf"' /path/to/vendor/composer.lock | grep version`
  4. 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

CVE-2025-47916CVSS 10Invision Community 5.0.0 before 5.0.7 allows remote code execution via crafted template strings to themeeditor.php. The issue lies within the themeeditor controller (file: /applications/core/modules/front/system/themeeditor.php), where a protected method named customCss can be invoked by unauthenticated users. This method passes the value of the content parameter to the Theme::makeProcessFunction() method; hence it is evaluated by the template engine. Accordingly, this can be exploited by unauthenticated attackers to inject and execute arbitrary PHP code by providing crafted template strings.
CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.
CVE-2026-39337CVSS 10ChurchCRM is an open-source church management system. Prior to 7.1.0, critical pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The "$dbPassword" variable is not sanitized. This vulnerability exists due to an incomplete fix for CVE-2025-62521. This vulnerability is fixed in 7.1.0.
CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.

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