# CVE-2024-25117: php-svg-lib lacks path validation on font through SVG inline styles

- Severity: Medium 6.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.93%, higher than 61% of CVEs (2026-12-01)
- Published: 2024-02-21T16:25:17.970Z
- Modified: 2026-09-10T03:50:06.245Z
- Also known as: GHSA-f3qr-qr4x-j273
- Weaknesses: CWE-73, CWE-502, CWE-610
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- dompdf php-svg-lib: < 0.5.2; before 0.5.2
- phenx/php-svg-lib (Packagist): before 0.5.2

## Every score

- GitHub_M: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L`
- GitHub: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/dompdf/php-svg-lib/security/advisories/GHSA-f3qr-qr4x-j273> (vendor-advisory, web)
- <https://github.com/dompdf/php-svg-lib/commit/732faa9fb4309221e2bd9b2fda5de44f947133aa> (patch, web)
- <https://github.com/dompdf/php-svg-lib/commit/8ffcc41bbde39f09f94b9760768086f12bbdce42> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-25117> (advisory)
- <https://github.com/dompdf/php-svg-lib> (package)

## Sources

- CVE List: [CVE-2024-25117](https://www.cve.org/CVERecord?id=CVE-2024-25117), CVE Terms of Use, modified 2024-08-28
- GitHub Advisory Database: [GHSA-f3qr-qr4x-j273](https://github.com/advisories/GHSA-f3qr-qr4x-j273), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-25117](https://nvd.nist.gov/vuln/detail/CVE-2024-25117), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-25117 · Whole record: https://cve.day/CVE-2024-25117.json · Rebuilt by cve.day 2026-11-25T22:58:36.966Z
