Skip to content

← Actionable
Medium, CVSS 6.3

Dompdf: Uncontrolled resource consumption based on declared BMP dimensions

CVE-2026-59941GHSA-8hg6-c449-896m

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (dompdf/dompdf 3.1.6), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.3 · 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 · score source
EPSS
  • CVE-2026-59941: 0.64% estimated exploitation activity in the next 30 days; percentile 50.92 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary dompdf accepts 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. It was demonstrated that a 169-byte request drove dompdf to 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. Details Root cause The image is processed based on declared dimensions and type alone — no pixel budget: For BMPs that getimagesize() does not fully parse, dompdf…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-8hg6-c449-896m

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-59941

Advisory: Dompdf: Uncontrolled resource consumption based on declared BMP dimensions
IDs: CVE-2026-59941, GHSA-8hg6-c449-896m
Record: https://patchnext.com/advisories/cve-2026-59941 (revision 1, source checked 26 Oct 2026, 14:50 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: dompdf/dompdf 3.1.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- Packagist dompdf/dompdf: affected < 3.1.6; fixed in 3.1.6

## Suggested inspection (read-only)
- Packagist dompdf/dompdf: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on dompdf/dompdf.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-8hg6-c449-896m (GitHub-reviewed advisory GHSA-8hg6-c449-896m lists affected ranges: Packagist dompdf/dompdf >=0 <3.1.6)

Commands are suggestions: review each one before running it.

Loading voting…