Code execution via unvalidated use-element href merge
Published Dec 12, 2023 · Updated Aug 2, 2024
PHAR deserialization in php-svg-lib before 0.5.1 allows remote attackers to execute code via crafted SVG input on PHP before 8. UseTag::handle merges an unvalidated use-element href into a referenced image, bypassing prior image URL checks before file_get_contents loads the resulting PHAR URL. Reachability requires an application to render attacker-controlled SVG data under PHP before 8; available gadget classes determine whether file deletion or code execution follows.
Summary
What happened
PHAR deserialization in php-svg-lib before 0.5.1 allows remote attackers to execute code via crafted SVG input on PHP before 8. UseTag::handle merges an unvalidated use-element href into a referenced image, bypassing prior image URL checks before file_get_contents loads the resulting PHAR URL. Reachability requires an application to render attacker-controlled SVG data under PHP before 8; available gadget classes determine whether file deletion or code execution follows.
The record
- CVE
- CVE-2023-50252
- Published
- Dec 12, 2023
- Updated
- Aug 2, 2024
- Vendor
- dompdf
- Product
- php-svg-lib
- Classifications
- CWE-502, CWE-15
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Dec 12, 2023CVE publishedPublication date reported by the CVE source.
- Aug 2, 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.5.1
What conditions does exploitation require?
What is affected?
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
- GitHub advisory SVG 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