CVEfocus › CVE database › CVE-2026-59941

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

CVSS 6.3 MediumEPSS 0.6% (higher than 45% of CVEs)Published 2026-07-28Updated 2026-07-29Assigner: GitHub_M

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.

CWE-400

What to do

Fixed builds are available from Packagist: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
4Fix pending
1Under investigation

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04php-dompdfUnder investigationUBUNTU-CVE-2026-59941
Ubuntu 20.04php-dompdfFix pendingUBUNTU-CVE-2026-59941
Ubuntu 18.04php-dompdfFix pendingUBUNTU-CVE-2026-59941
Ubuntu 16.04php-dompdfFix pendingUBUNTU-CVE-2026-59941
Debian 12php-dompdfFix pendingDEBIAN-CVE-2026-59941
Packagist librarydompdf/dompdfFixed3.1.6GHSA-8hg6-c449-896m

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.