Deserialization of Untrusted Data
CVE-2023-28115
Summary
Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. In knplabs/knp-snappy versions prior to 1.4.2, Snappy is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the "file_exists()"" function. If an attacker can upload files of any type to the server he can pass in the "phar://" protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to Remote Code Execution especially when snappy is used with frameworks with documented POP chains like "Laravel/Symfony" vulnerable developer code. If a user can control the output file from the "generateFromHtml()" function, it will invoke deserialization. This vulnerability is capable of Remote Code Execution if Snappy is used with frameworks or developer code with vulnerable POP chains.
- LOW
- NETWORK
- HIGH
- UNCHANGED
- NONE
- NONE
- HIGH
- HIGH
CWE-502 - Deserialization of Untrusted Data
Deserialization of untrusted data vulnerabilities enable an attacker to replace or manipulate a serialized object, replacing it with malicious data. When the object is deserialized at the victim's end the malicious data is able to compromise the victim’s system. The exploit can be devastating, its impact may range from privilege escalation, broken access control, or denial of service attacks to allowing unauthorized access to the application's internal code and logic which can compromise the entire system.
References
Advisory Timeline
- Published