CVE-2026-59941
Description
Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior accept a BMP image and generates a PDF-compatible PNG based only on its declared header dimensions and never bounds width × height before the image is converted through GD. A 58-byte BMP whose header declares e.g. 6000×6000 is accepted and later drives imagecreatetruecolor($width, $height) (and PHP's native BMP decoder) to allocate the full pixel canvas. A payload can fit in a single HTTP request: the BMP can be inlined as a data:image/bmp;base64,… URI inside attacker-controlled HTML, so no upload, no remote fetch, and no chroot-reachable file is required. I measured a 169-byte request driving a dompdf render to ~412 MB peak RSS and ~4.8 s of CPU/wall time, versus ~34 MB for an identically-sized benign request — roughly a 12× memory amplification per request, repeatable and unauthenticated. This issue has been fixed in version 3.16.
Weakness
- CWE-400: Uncontrolled Resource Consumption
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-07-29 |
Timeline
- 2026-07-22GitHub advisory published (GHSA-8hg6-c449-896m)6 days before publication
- 2026-07-28Published by the CNA20:42 UTC
- 2026-07-29CISA SSVC decision recorded1 day after publication
Exploit and advisory records
GitHub advisory GHSA-8hg6-c449-896m, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| Packagist dompdf/dompdf | before 3.1.6 | 3.1.6 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| dompdf_project dompdf | before 3.1.6fixed in 3.1.6 | 3.1.6 |
References
- https://github.com/dompdf/dompdf/commit/7c65e7bbeccf146b2409740405af73949ad129d0
- https://github.com/dompdf/dompdf/security/advisories/GHSA-8hg6-c449-896m
- https://github.com/dompdf/dompdf/releases/tag/v3.1.6
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-59941'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-59941'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-59941'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-59941'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).