/

CVE-2026-55555

Severity:

HIGH RISK

(7.5)

File Existence Oracle (CWE-203) in Dompdf CSS Parser

CVE-2026-55555

Analyzed

Vulnerability type

Category:

Observable Timing or Behavioral Discrepancy

CWE:

CWE-203

Impact:

Sensitive File Enumeration and Denial of Service

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dompdf versions through 3.15 can expose whether local files exist when attacker-controlled HTML uses CSS font references to access the local filesystem. Repeated processing of existing files can exhaust PHP memory, creating an observable difference that may let an attacker enumerate sensitive paths and potentially disrupt PDF generation.

Affected context

The issue occurs in Dompdf deployments that process attacker-controlled or insufficiently sanitized HTML and permit CSS @font-face references to local resources. Risk is higher when requests accept large HTML documents, local file access is available to the renderer, and the configured PHP or application memory limit can be reached during repeated processing. Chroot restrictions may not fully prevent the oracle because the observable behavior can reveal whether a referenced path exists within the accessible environment.

Exploit preconditions

  • Attack surface: An application endpoint that converts user-influenced HTML into PDF documents
  • Required access: Ability to submit HTML containing CSS font references, without adequate sanitization or resource restrictions
  • Trigger point: Dompdf processing of local file references in CSS @font-face directives
  • Environmental condition: The renderer must be able to access candidate local paths and have a memory limit that can be exhausted
  • Why exploitation is possible: Existing and missing files produce distinguishable processing outcomes, allowing file existence to be inferred from resource exhaustion or failure behavior

Why this happens

The vulnerability results from exposing local resource resolution through CSS processing and producing distinguishable outcomes based on file existence. Existing files can enter a repeated or resource-intensive processing path, while nonexistent files fail quickly or are ignored. This behavior maps to CWE-203: Observable Discrepancy, because externally visible differences reveal information about internal state. The same processing path can also create a denial-of-service condition when memory consumption is not sufficiently bounded.

Potential impact

  • An attacker may enumerate sensitive file paths within the renderer's accessible filesystem
  • Confidential configuration, application, or environment information could be exposed indirectly
  • PDF conversion requests may consume excessive memory and fail
  • Application worker processes could crash or become unavailable
  • Repeated requests could contribute to broader service degradation

General mitigation guidance

Mitigation generally focuses on reducing trust in submitted HTML and preventing document rendering from resolving local resources.

Common defensive patterns include:

  • Disable local file access and external resource resolution unless explicitly required
  • Sanitize HTML and CSS with an allowlist that excludes local file references and unsafe directives
  • Enforce strict limits on document size, CSS complexity, rendering time, and memory consumption
  • Use isolated rendering workers with least-privilege filesystem permissions and minimal readable data
  • Return uniform responses and avoid exposing detailed renderer warnings or memory errors to untrusted callers
  • Apply defense-in-depth monitoring and rate limits to resource-intensive conversion endpoints

How teams detect issues like this

Organizations can look for:

  • Static analysis and code review signals showing user-controlled HTML passed directly to PDF rendering
  • Configuration review findings where local file access, unrestricted URI resolution, or verbose renderer warnings are enabled
  • Policy checks requiring HTML and CSS sanitization before document conversion
  • Runtime telemetry showing repeated conversion failures, memory exhaustion, unusually large documents, or probing-like sequences of file references
  • Automated security review rules that flag PDF renderers handling untrusted content without resource and filesystem restrictions

Sources

SourceLink
github.comgithub.com/dompdf/dompdf/commit/75c39a083bf7298044fb27399b4cc183054438b4
github.comgithub.com/dompdf/dompdf/releases/tag/v3.1.6
github.comgithub.com/dompdf/dompdf/security/advisories/GHSA-7x2p-4jvh-6384

Frequently asked

questions

It can be remotely exploitable when a web application accepts attacker-controlled HTML for PDF conversion and does not adequately restrict CSS resource references.

The attacker generally needs access to an HTML-to-PDF request or another workflow that allows untrusted HTML to reach Dompdf. Direct filesystem access is not necessarily required.

Prevent the renderer from accessing local files, sanitize HTML and CSS with an allowlist, and impose strict document and resource limits.

Treat rendered documents as untrusted input, isolate conversion workers, restrict their filesystem visibility, normalize error behavior, and monitor repeated resource-intensive requests.

Find out what's already
exploitable in your codebase.