what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

pearLiveUser.txt

pearLiveUser.txt
Posted Feb 25, 2006
Authored by James Bercegay | Site gulftech.org

PEAR LiveUser versions 0.16.8 and below suffer from an arbitrary file access vulnerability.

tags | advisory, arbitrary
SHA-256 | 4f1104c84c5633441416416b6cdd57c8f560b13447508ef49b8bd0aee07eb9cc

pearLiveUser.txt

Change Mirror Download
##########################################################
# GulfTech Security Research February 21, 2006
##########################################################
# Vendor : Markus Wolff
# URL : http://pear.php.net/package/LiveUser/
# Version : PEAR LiveUser <= 0.16.8
# Risk : Arbitrary File Access
##########################################################



Description:
LiveUser is a user authentication and permission management
framework that is part of php's PEAR Library. LiveUser has
many different features, including the ability to remember
a user via cookies. Unfortunately there is an issue with
how extracted cookie data is handled by the LiveUser library
within the remember feature which makes it possible for an
attacker to gain access to, and even delete potentially
sensitive files on the webserver. An updated version of the
LiveUser framework has been released, and users are advised
to upgrade to LiveUser 0.16.9



Arbitrary File Access:
There is an arbitrary file access vulnerability in PEAR LiveUser
that allows an attacker to access arbitrary files on the server

$cookieData = $_COOKIE[$this->_options['cookie']['name']];
if (strlen($cookieData) < 65
// kill all old style remember me cookies
|| (strpos($cookieData, ':') && strpos($cookieData, ':') < 64)
) {
// Delete cookie if it's not valid, keeping it messes up the
// authentication process
$this->deleteRememberCookie();
$this->_stack->push(LIVEUSER_ERROR_COOKIE, 'error', array(),
'Wrong data in cookie store in LiveUser::readRememberMeCookie()');
return false;
}

$store_id = substr($cookieData, 0, 32);
$passwd_id = substr($cookieData, 32, 32);
$handle = substr($cookieData, 64);

$dir = $this->_options['cookie']['savedir'];

$fh = @fopen($dir . '/' . $store_id . '.lu', 'rb');
if (!$fh) {
$this->deleteRememberCookie();
$this->_stack->push(LIVEUSER_ERROR_CONFIG, 'exception', array(),
'Cannot open file for reading');
return false;
}

$fields = fread($fh, 4096);
fclose($fh);
if (!$fields) {
$this->deleteRememberCookie();
$this->_stack->push(LIVEUSER_ERROR_CONFIG, 'exception', array(),
'Cannot read file');
return false;
}

The above code is taken from LiveUser.php @ lines 1269-1303 and
clearly shows the $store_id variable being assigned unsanitized
data, which is passed to an fopen called shortly thereafter. The
good news is that as far as I can tell this issues can not be
abused in a real world scenario much further than enumerating
file existence on the local filesystem.



Arbitrary File Deletion:
Similar to the previously mentioned issue, this vulnerability may
allow a malicious user to delete arbitrary files on the local
server by supplying malicious cookie data.

$cookieData = $_COOKIE[$this->_options['cookie']['name']];
if (strlen($cookieData) < 65) {
$this->_stack->push(LIVEUSER_ERROR_COOKIE, 'error', array(),
'Wrong data in cookie store in LiveUser::deleteRememberCookie()');
return false;
}

$store_id = substr($cookieData, 0, 32);
@unlink($this->_options['cookie']['savedir'] . '/'.$store_id.'.lu');

The above code is also taken from LiveUser.php and resides @ lines
1343-1351. Here we see user supplied data being used in an unlink
call which could allow an attacker to delete arbitrary files on the
local server by traversing out of the cwd and terminating the fopen
call with a null byte.



Solution:
An updated version of the LiveUser framework has been released to
address these issues. The current release is LiveUser 0.16.9 and
users should update their LiveUser libraries as soon as possible.
Special thanks to Lukas Smith for a very prompt resolution!



Credits:
James Bercegay of the GulfTech Security Research Team



Related Info:
The original advisory can be found at the following location
http://www.gulftech.org/?node=research&article_id=00103-02212006
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    38 Files
  • 24
    Sep 24th
    65 Files
  • 25
    Sep 25th
    24 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close