CVE-2023-50252 php-svg-lib unsafe attributes merge when parsing `use` tag
An attacker can trigger PHAR deserialization via unsafe attribute merging in SVG parsing, leading to remote code execution.
- 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-50252?
CVE-2023-50252 is a high-severity unsafe deserialization vulnerability in dompdf php-svg-lib, published on 12 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
php-svg-lib is an SVG file parsing / rendering library. Prior to version 0.5.1, when handling `<use>` tag that references an `<image>` tag, it merges the attributes from the `<use>` tag to the `<image>` tag. The problem pops up especially when the `href` attribute from the `<use>` tag has not been sanitized. This can lead to an unsafe file read that can cause PHAR Deserialization vulnerability in PHP prior to version 8. Version 0.5.1 contains a patch for this issue.
Which versions are affected by CVE-2023-50252?
It affects 1 product.
Products include Dompdf Php-Svg-Lib.
How do I fix CVE-2023-50252?
Upgrade to a fixed version.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2023-50252 being exploited?
There is no known exploitation of CVE-2023-50252 in the wild and no public exploit code.
Other vulnerabilities in dompdf php-svg-lib
Sources
Also known as DEBIAN-CVE-2023-50252, GHSA-jq98-9543-m4cr.