CVE-2026-59942
PoC largeUnauthenticated DoS in Dompdf via resource exhaustion from crafted HTML image
Dompdf, a widely used PHP library that converts HTML to PDF, is vulnerable to an unauthenticated denial-of-service flaw (CWE-400, uncontrolled resource consumption) affecting versions 3.15 and prior. An attacker supplies HTML containing a single image with extreme dimensions (e.g., 30,000x30,000 pixels), encoded as high-entropy Base64 data and wrapped in specific CSS containers, which bypasses Dompdf's early dimension-validation checks; during rendering, bounding-box and internal buffer calculations then consume unbounded CPU time and memory. The attacker gains the ability to crash the PHP process, completely denying service to PDF generation and potentially to the web application sharing that process. Any application that lets users supply HTML content or URLs that are then converted to PDF with Dompdf is affected; applications that only render internally generated documents are less directly exposed. No in-the-wild exploitation is reported (EPSS 0.7%, not in CISA KEV), but a public security advisory with proof-of-concept details exists and a fix is available in version 3.16.
What to do: Upgrade Dompdf to version 3.16 or later, and verify that transitive dependencies (e.g., PHP frameworks or CMS plugins that bundle Dompdf) pull in the fixed release. As interim mitigation, sanitize or restrict user-supplied HTML, cap image dimensions and Base64 image size, and enforce strict per-render PHP memory and execution-time limits. Prioritize auditing any application that converts end-user-provided HTML or URLs to PDF, since those configurations are the directly exploitable ones.
| dompdf project dompdf | 3.15 and prior (fixed in 3.16) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.
- Vendors
- dompdf project
- Products
- dompdf
- Weakness
- CWE-400
- Vector
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.