Code execution via unchecked SVG font path
Published Feb 21, 2024 · Updated Aug 28, 2024
Path validation failure in dompdf php-svg-lib before 0.5.2 allows attackers to trigger PHAR deserialization via crafted SVG font-family values. Style::fromAttributes() and Style::parseCssStyle() accept inline or attribute font-family values and pass a phar:// path as fontName to downstream font handling without validating the scheme or external-reference policy. Code execution requires PHP before 8.0 and a consuming library that accepts attacker-controlled SVG input without revalidating fontName; other consumers can suffer restriction bypass or server-side request forgery.
Summary
What happened
Path validation failure in dompdf php-svg-lib before 0.5.2 allows attackers to trigger PHAR deserialization via crafted SVG font-family values. Style::fromAttributes() and Style::parseCssStyle() accept inline or attribute font-family values and pass a phar:// path as fontName to downstream font handling without validating the scheme or external-reference policy. Code execution requires PHP before 8.0 and a consuming library that accepts attacker-controlled SVG input without revalidating fontName; other consumers can suffer restriction bypass or server-side request forgery.
The record
- CVE
- CVE-2024-25117
- Published
- Feb 21, 2024
- Updated
- Aug 28, 2024
- Vendor
- dompdf
- Product
- php-svg-lib
- Classifications
- CWE-73, CWE-502
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Feb 21, 2024CVE publishedPublication date reported by the CVE source.
- Aug 28, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <0.5.2
- Affected versionversion=< 0.5.2
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Crafted SVG font-family proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo