php-svg-lib lacks path validation on font through SVG inline styles
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-502.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| dompdf | php-svg-lib | before 0.5.2 | 0.5.2 | Patch available | CNA |
| — | phenx/php-svg-lib (Packagist) | before 0.5.2 | 0.5.2 | Patch available | GHSA-f3qr-qr4x-j273 |
- php-svg-lib Vendordompdf Affected before 0.5.2 Fixed in 0.5.2 Patch available CNA
- phenx/php-svg-lib (Packagist) Vendor— Affected before 0.5.2 Fixed in 0.5.2 Patch available GHSA-f3qr-qr4x-j273
Remediation
- Fix · CNA php-svg-lib (dompdf) Fixed in 0.5.2
- Fix · GHSA-f3qr-qr4x-j273 phenx/php-svg-lib (Packagist) Fixed in 0.5.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-25117
- 2026-10-03 Alias added: GHSA-f3qr-qr4x-j273
References
Patch 2
Advisory 2
More dompdf Php-svg-lib vulnerabilities
- TI-2023-27479 php-svg-lib possible DoS caused by infinite recursion when parsing SVG document CVSS 3.1HIGH 7.5
- TI-2023-27480 php-svg-lib unsafe attributes merge when parsing `use` tag CVSS 3.1CRITICAL 9.8
Sources
- CVE-2024-25117 · CVE Program
- CVE-2024-25117 · NVD
- FIRST EPSS
- GHSA-f3qr-qr4x-j273 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences