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.
Published: 2026-07-28
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Dompdf accepts BMP images based solely on declared header dimensions without bounding width × height before conversion with GD. A 58‑byte BMP with a header such as 6000×6000 triggers imagecreatetruecolor and PHP’s native BMP decoder to allocate a 6000×6000 canvas, consuming large amounts of memory and CPU. A single HTTP request containing a data:image/bmp;base64… URI can trigger this behavior, generating a 412 MB peak RSS and nearly five seconds of CPU time compared to 34 MB for a benign request— a more than twelvefold memory amplification. This flaw allows unauthenticated attackers to cause resource exhaustion and deny service.

Affected Systems

Versions of the dompdf HTML‑to‑PDF library prior to 3.16 are affected. The vendor identified in the CNA is dompdf:dompdf, with the vulnerable releases being 3.15 and earlier. The fix is included in version 3.16 and later.

Risk and Exploitability

The CVSS score of 6.3 suggests a moderate severity, while the EPSS score of less than 1 % indicates a low probability of exploitation at the time of analysis. The vulnerability is not listed in the CISA KEV catalog. Attackers can exploit it via an unauthenticated HTTP request containing a data URI‑encoded BMP, requiring no authentication, uploads, or remote file fetches. The impact is a denial of service that can affect one or many users depending on the target application’s deployment scale.

Generated by OpenCVE AI on August 3, 2026 at 14:15 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade dompdf to version 3.16 or later, which includes validation of BMP header dimensions before processing.
  • If a patch cannot be applied immediately, filter or reject data:image/bmp URIs in the HTML input before rendering to prevent the creation of oversized image canvases.
  • Set application or server resource limits—such as request size, maximum execution time, and memory usage—to mitigate potential resource exhaustion triggered by uncontrolled image processing.

Generated by OpenCVE AI on August 3, 2026 at 14:15 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8hg6-c449-896m Dompdf: Uncontrolled resource consumption based on declared BMP dimensions
History

Wed, 29 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 28 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Dompdf
Dompdf dompdf
Vendors & Products Dompdf
Dompdf dompdf

Tue, 28 Jul 2026 21:00:00 +0000

Type Values Removed Values Added
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.
Title Dompdf: Uncontrolled resource consumption based on declared BMP dimensions
Weaknesses CWE-400
References
Metrics cvssV4_0

{'score': 6.3, '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'}


Subscriptions

Dompdf Dompdf
Dompdf Project Dompdf
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-29T12:41:45.875Z

Reserved: 2026-07-07T18:20:06.127Z

Link: CVE-2026-59941

cve-icon Vulnrichment

Updated: 2026-07-29T12:41:40.383Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-28T21:17:29.003

Modified: 2026-08-04T16:34:42.657

Link: CVE-2026-59941

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T14:30:18Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption