{"id":"CVE-2026-59941","published":"2026-07-28T20:42:57Z","modified":"2026-07-29T12:41:45Z","title":"Dompdf: Uncontrolled resource consumption based on declared BMP dimensions","vendor":"dompdf","product":"dompdf","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00644,"percentile":0.51815,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/dompdf/dompdf/security/advisories/GHSA-8hg6-c449-896m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/dompdf/dompdf/commit/7c65e7bbeccf146b2409740405af73949ad129d0","tags":["x_refsource_MISC"]},{"url":"https://github.com/dompdf/dompdf/releases/tag/v3.1.6","tags":["x_refsource_MISC"]}],"priority":{"score":19.8,"factors":[{"name":"EPSS percentile","points":10.36},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.41}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-08-02","earliestUrl":"https://github.com/far00t01/CVE-2026-59941","repos":[{"name":"far00t01/CVE-2026-59941","url":"https://github.com/far00t01/CVE-2026-59941","stars":0,"created":"2026-08-02"}]},"first":{"date":"2026-08-02","source":"PoC-in-GitHub","url":"https://github.com/far00t01/CVE-2026-59941"},"provenance":"source"},"vendorSlug":"dompdf","affectedVersions":[{"vendor":"dompdf","product":"dompdf","versions":["< 3.1.6"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-29T12:41:13.459265Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"dompdf/dompdf","vulnerableRanges":["<3.1.6"],"patched":["3.1.6"],"from":["GHSA-8hg6-c449-896m"],"provenance":"source"}],"summary":{"text":"Dompdf, the HTML-to-PDF converter for PHP, versions 3.15 and prior, fails to bound the width and height declared in a BMP image header before converting the image through GD, so a crafted BMP can make the converter allocate far more memory and CPU than its size suggests. An unauthenticated remote attacker who can submit HTML to a dompdf render can exploit this over the network with no user interaction, by inlining a tiny BMP as a base64 data URI, with no upload or file access required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:35:20Z"},"euvd":{"id":"EUVD-2026-50061","exploited":false,"provenance":"source"}}