CVE-2024-25117
published medium CVSS 3.1 · 6.8php-svg-lib lacks path validation on font through SVG inline styles
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| dompdf | — | php-svg-lib< 0.5.2 | Affected | Not stated | GitHub_M |
| dompdf | — | php-svg-lib0 to < 0.5.2 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| Debian | bookworm | php-dompdf-svg-lib | Advisory build | 0.5.0-3+deb12u1 | DSA-5642-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.8 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| dompdf | php-svg-lib | < 0.5.2 (affected) | GitHub_M · cna |
| dompdf | php-svg-lib | 0 to < 0.5.2 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
2- CWE-73 CWE-73: External Control of File Name or Path
- CWE-502 CWE-502: Deserialization of Untrusted Data
References
3Provider assertions
3GitHub_M · cna
php-svg-lib lacks path validation on font through SVG inline styles
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- ec9b4d47ca82df6dda3e64d19eaa2573aaa19546e0253b16e2002e58b7ec980c
- Ingested
- 23 Sep 2026, 08:20:06 UTC
- Source record
- Official CVE record