What’s Vulnerable › Vulnerabilities
CVE-2023-50252: php-svg-lib unsafe attributes merge when parsing `use` tag
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 23.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2023-12-12 · updated 2026-06-17
- Weakness: CWE-15
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.
Affected products
- dompdf php-svg-lib: before 0.5.1 — fixed in 0.5.1
How to fix
Upgrade to a fixed version: dompdf php-svg-lib 0.5.1. Check the vendor advisory for mitigations.
References
- https://github.com/dompdf/php-svg-lib/commit/08ce6a96d63ad7216315fae34a61c886dd2dc030
- https://github.com/dompdf/php-svg-lib/security/advisories/GHSA-jq98-9543-m4cr
- https://github.com/dompdf/php-svg-lib/commit/08ce6a96d63ad7216315fae34a61c886dd2dc030
- https://github.com/dompdf/php-svg-lib/security/advisories/GHSA-jq98-9543-m4cr
Get alerted when CVE-2023-50252 or the next vulnerability affects your stack