Deserialization of Untrusted Data Affecting timber/timber package, versions <2.1.0
Snyk CVSS
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PHP-TIMBERTIMBER-6613074
- published 14 Apr 2024
- disclosed 12 Apr 2024
- credit Unknown
Introduced: 12 Apr 2024
New CVE-2024-29800 Open this link in a new tabHow to fix?
Upgrade timber/timber
to version 2.1.0 or higher.
Overview
Affected versions of this package are vulnerable to Deserialization of Untrusted Data due to a lack of checking the input before passing it into the file_exists
function. An attacker can execute arbitrary code by uploading files of any type to the server and then passing in the phar://
protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This is particularly dangerous when used with frameworks or developer code that have known POP chains, leading to remote code execution.
Details
Serialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like Remote Method Invocation (RMI), Java Management Extension (JMX), Java Messaging System (JMS), Action Message Format (AMF), Java Server Faces (JSF) ViewState, etc.
Deserialization of untrusted data (CWE-502) is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, thus allowing the attacker to control the state or the flow of the execution.