CVE-2023-23924: Dompdf vulnerable to URI validation failure on SVG parsing

dompdf/dompdf Updated 02 Oct 2025

Summary

01/02/2023
Yes i
Critical
10.0

CVE-2023-23924: Dompdf vulnerable to URI validation failure on SVG parsing. Affects dompdf/dompdf versions < 2.0.2. Fixed in 2.0.2. 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 a PHP library that allows users to generate PDF files from HTML content. It is commonly used in web applications to convert HTML pages into printable documents. Dompdf provides various features for styling and formatting the PDF output, making it a popular choice for developers. However, a vulnerability has been discovered in version 2.0.1 of Dompdf that allows for URI validation failure during SVG parsing.

Vulnerability Detail

The vulnerability in Dompdf version 2.0.1 occurs during the parsing of SVG files that contain <image> tags with uppercase letters. The URI validation process fails to detect these tags due to a case-sensitive comparison. This allows an attacker to bypass the validation and potentially exploit the vulnerability. In PHP versions prior to 8.0.0, this can lead to arbitrary object unserialization through the phar URL wrapper, which can result in arbitrary file deletion and potentially remote code execution.

How To Fix

Minimum fixed version

2.0.2

This is the first release that contains the fix.

composer require dompdf/dompdf:2.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version of Dompdf to mitigate the risk of exploitation.

Conclusion

The vulnerability in Dompdf version 2.0.1 allows for URI validation failure during SVG parsing, potentially leading to arbitrary object unserialization and remote code execution. It is crucial to upgrade to version 2.0.2 or later to mitigate the risk of exploitation. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for dompdf/dompdf →

Share this vulnerability

FAQ

Dompdf is a PHP library used for generating PDF files from HTML content. It is commonly used in web applications to convert HTML pages into printable documents.

The vulnerability allows an attacker to bypass URI validation and potentially exploit the vulnerability. In PHP versions prior to 8.0.0, this can lead to arbitrary object unserialization, which can result in arbitrary file deletion and potentially remote code execution.

To fix this vulnerability, it is recommended to upgrade to version 2.0.2 of Dompdf or later. This version includes a fix for the URI validation failure during SVG parsing.

There are no known workarounds for this vulnerability. Upgrading to the fixed version of Dompdf is the recommended solution.

For more information about this vulnerability, you can refer to the CVE identifier CVE-2023-23924 and the GitHub Security Advisory GHSA-3cw5-7cxw-v5qg.

Related vulnerabilities

Recent vulnerabilities recorded for dompdf/dompdf.

How To Fix

Minimum fixed version

2.0.2

This is the first release that contains the fix.

composer require dompdf/dompdf:2.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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