Recursive Chaining Vulnerability in Dompdf Package Could Lead to Resource Exhaustion

php-dompdf Updated 02 Oct 2025

Summary

13/12/2023
N/A
No i
High
7.5

CVE-2023-50262: Dompdf is an HTML to PDF converter for PHP. Affects php-dompdf versions < 41cbac16f3cf56affa49f06e8dae66d0eac2b593. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Dompdf is an open-source HTML to PDF converter for PHP, widely used for generating PDF documents from HTML content. It supports various features such as SVG images, CSS styles, and more. However, prior to version 2.0.4, Dompdf had a vulnerability in its SVG image parsing mechanism that allowed for recursive chaining of SVG references, potentially leading to significant resource exhaustion.

Vulnerability Detail

The vulnerability arises from Dompdf's inadequate validation of SVG references, specifically in scenarios where multiple SVG documents reference each other. This oversight allows a malicious actor to create a chain of SVG references that can lead to infinite recursion. When Dompdf processes such a malicious payload, it may exceed the allowed execution time or memory usage, causing the application to crash. An attacker could exploit this by sending multiple requests, leading to denial of service as the system becomes unable to handle incoming requests. The CVSS score for this vulnerability is 7.5, indicating a high severity level.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can limit the number of SVG references in their documents or avoid using SVG images that reference other SVG files until the package is updated. Additionally, implementing rate limiting on incoming requests may help mitigate the impact of potential attacks.

Conclusion

The vulnerability in Dompdf related to recursive SVG references poses a significant risk to applications using this package. Upgrading to version 2.0.4 or later is essential to mitigate this risk. Users should also consider implementing workarounds until they can apply the necessary updates.

See every vulnerability recorded for php-dompdf →

Share this vulnerability

FAQ

The vulnerability allows for recursive chaining of SVG references, which can lead to resource exhaustion and denial of service.

You can use Vulert's playground to check if your application is affected by this vulnerability without requiring any signup.

The potential impacts include application crashes, denial of service, and resource exhaustion on the server.

Yes, version 2.0.4 and later of Dompdf contains a fix for this vulnerability.

If an immediate upgrade is not possible, consider implementing rate limiting and avoiding SVG references in your documents as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for php-dompdf.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback