# CVE-2026-59941: Dompdf: Uncontrolled resource consumption based on declared BMP dimensions

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 45% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-22T22:50:34.000Z
- Modified: 2026-08-04T16:34:42.657Z
- Also known as: GHSA-8hg6-c449-896m
- Weaknesses: CWE-400
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- dompdf dompdf: < 3.1.6
- dompdf/dompdf (Packagist): before 3.1.6
- dompdf_project dompdf: before 3.1.6

## Every score

- GitHub_M: CVSS:4.0 6.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/dompdf/dompdf/security/advisories/GHSA-8hg6-c449-896m> (exploit, vendor-advisory, web)
- <https://github.com/dompdf/dompdf/commit/7c65e7bbeccf146b2409740405af73949ad129d0> (patch, web)
- <https://github.com/dompdf/dompdf/releases/tag/v3.1.6> (release-notes, web)
- <https://github.com/dompdf/dompdf> (package)

## Sources

- CVE List: [CVE-2026-59941](https://www.cve.org/CVERecord?id=CVE-2026-59941), CVE Terms of Use, modified 2026-07-29
- GitHub Advisory Database: [GHSA-8hg6-c449-896m](https://github.com/advisories/GHSA-8hg6-c449-896m), CC-BY-4.0, modified 2026-07-22
- NVD: [CVE-2026-59941](https://nvd.nist.gov/vuln/detail/CVE-2026-59941), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2026-59941 · Whole record: https://cve.day/CVE-2026-59941.json · Rebuilt by cve.day 2026-11-25T22:59:30.382Z
