CVE-2023-23924 URI validation failure on SVG parsing in Dompdf
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.
Which versions are affected by CVE-2023-23924?
2 open source packages ship an affected version, including dompdf/dompdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
dompdf/dompdf Packagist | All versions | 2.0.2 |
dompdf/dompdf Packagist | All versions | 2.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.
Other vulnerabilities in dompdf
- CVE-2023-24813 URI validation failure on SVG parsing. Bypass of CVE-2023-23924
- CVE-2021-3838 PHAR Deserialization in dompdf/dompdf
- CVE-2021-3902 Improper Restriction of XML External Entity Reference in dompdf/dompdf
- CVE-2022-28368 Remote code injection in dompdf/dompdf
- CVE-2014-5013 DOMPDF Remote Code Execution
Sources
Also known as GHSA-3cw5-7cxw-v5qg.