CVE-2024-25117 Details
Description
php-svg-lib is a scalable vector graphics (SVG) file parsing/rendering library. Prior to version 0.5.2, php-svg-lib fails to validate that font-family doesn't contain a PHAR url, which might leads to RCE on PHP < 8.0, and doesn't validate if external references are allowed. This might leads to bypass of restrictions or RCE on projects that are using it, if they do not strictly revalidate the fontName that is passed by php-svg-lib. The `Style::fromAttributes(`), or the `Style::parseCssStyle()` should check the content of the `font-family` and prevents it to use a PHAR url, to avoid passing an invalid and dangerous `fontName` value to other libraries. The same check as done in the `Style::fromStyleSheets` might be reused. Libraries using this library as a dependency might be vulnerable to some bypass of restrictions, or even remote code execution, if they do not double check the value of the `fontName` that is passed by php-svg-lib. Version 0.5.2 contains a fix for this issue.
A vulnerability in php-svg-lib prior to version 0.5.2 allows for remote code execution on PHP versions below 8.0. The library fails to properly validate the 'font-family' attribute in SVG files, allowing PHAR URLs to be injected. This unvalidated input can be exploited if the 'fontName' is not revalidated by projects using php-svg-lib. Additionally, the library does not check if external references are permitted, potentially leading to further exploitation.
Users can upgrade to php-svg-lib version 0.5.2 or later, which addresses this vulnerability by implementing proper validation of the 'font-family' attribute to prevent the use of PHAR URLs.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 22, 2024References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-610 | Externally Controlled Reference to a Resource in Another Sphere | [email protected] |
| CWE-502 | Deserialization of Untrusted Data | [email protected] |
| CWE-73 | External Control of File Name or Path | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| dompdf php-svg-lib | < 0.5.2 |
CPE
Remediation
| |
| php php | < 8.0.0 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 5, 2025 | Initial Analysis | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Feb 21, 2024 | New CVE Received | [email protected] |