CVE-2023-23924 URI validation failure on SVG parsing in Dompdf

Critical 10.0 Published Updated

Attackers can bypass URI validation in Dompdf SVG parsing to trigger arbitrary deserialization, potentially leading to remote code execution or file deletion.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-23924?

CVE-2023-23924 is a critical unsafe deserialization vulnerability in dompdf, published on 31 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Dompdf is an HTML to PDF converter. The URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing `<image>` tags with uppercase letters. This may lead to arbitrary object unserialize on PHP < 8, through the `phar` URL wrapper. An attacker can exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can provide a SVG file to dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will lead to the very least to an arbitrary file deletion and even remote code execution, depending on classes that are available.

Weakness: CWE-863, CWE-551

Which versions are affected by CVE-2023-23924?

2 open source packages ship an affected version, including dompdf/dompdf. It affects 1 product.

PackageAffectedFixed in
dompdf/dompdf PackagistAll versions2.0.2
dompdf/dompdf PackagistAll versions2.0.2

Products include Dompdf Project Dompdf.

How do I fix CVE-2023-23924?

Upgrade dompdf/dompdf to 2.0.2 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2023-23924 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-23924 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-3cw5-7cxw-v5qg.

Is CVE-2023-23924 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free