dompdf/dompdf security advisory
CVE-2026-59943: Dompdf: Embedded SVG images can leak existence of files and directories within the filesystem
CVE-2026-59943 is a medium-severity security vulnerability in the PHP package dompdf/dompdf (CVSS 5.3), published 28 July 2026. It is fixed in 3.1.6; earlier versions are affected. It can be exploited without an account.
medium 5.3 published 2026-07-28 · updated 2026-08-04
- Affected versions
- < 3.1.6
- Fixed in
- 3.1.6
- Newest release
- 3.1.6
- Severity
- Medium · CVSS 5.3
- Type
- Security issue
CWE-209 - Exploited in the wild
- Not on the CISA KEV list
checked 2026-11-04
Is your dompdf/dompdf version affected?
Who can exploit CVE-2026-59943
- Access: No account. Anyone who can send a request to an app that uses the affected code.
CVSS vector (scored by NVD): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
How to fix CVE-2026-59943 in dompdf/dompdf
- Find the installed version:
composer show dompdf/dompdf. If you never required it yourself,composer why dompdf/dompdfshows which package pulls it in. - Update it:
composer update dompdf/dompdf --with-all-dependencies. You need 3.1.6 or newer. - If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example
"dompdf/dompdf": "^3.1.6"if you can take that version), or upgrade the package that requires it. - Run
composer audit. It reads the same advisory data and should no longer list CVE-2026-59943. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
The CVE-2026-59943 advisory
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.
References
- GitHub advisory GHSA-j8qw-6jw8-r297 github.com
- Fix commit 6a58996 github.com
- Release v3.1.6 github.com
Other dompdf/dompdf advisories
- medium CVE-2026-59942: Dompdf: Denial of Service (DoS) via Resource Exhaustion using Oversized Image Bitmaps 2026-07-22
- medium CVE-2026-59941: Dompdf: Uncontrolled resource consumption based on declared BMP dimensions 2026-07-22
- medium CVE-2026-56722: Dompdf: Local file read due to improper file path validation in SVG images encoded as data-URI 2026-07-22
- low CVE-2026-55555: Dompdf: File existence oracle via font-face stylesheet declaration 2026-07-22
- low CVE-2026-55554: Dompdf: Chroot Validation Bypass 2026-07-22
- critical CVE-2021-3902: Improper Restriction of XML External Entity Reference in dompdf/dompdf 2024-11-15
Related
Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.
Ask about a fixWhere this data comes from
- Affected and fixed versions: the Packagist security advisories API (GitHub Advisory Database and FriendsOfPHP), the same data
composer audituses. Synced 2026-11-03. - Description, score, weakness and references: NIST National Vulnerability Database (NVD), checked 2026-11-04. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Exploited-in-the-wild status: the CISA Known Exploited Vulnerabilities catalog, checked 2026-11-04.
- Compiled by Daniel Lasek at Laskyr from the sources above. The summary, “who can exploit it”, “how to fix it” and hardening sections are our plain-English reading of the record and are generated from it. The quoted description is the record's own text. Spot an error? Tell us.