#30609 [Opn]: cURL functions bypass open_basedir
| From: | guillaume dot maes at celeonet dot fr | Date: | Fri, 29 Oct 2004 08:47:13 +0000 |
| Subject: | #30609 [Opn]: cURL functions bypass open_basedir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-68470@lists.php.net to get a copy of this message | ||
ID: 30609
User updated by: guillaume dot maes at celeonet dot fr
Reported By: guillaume dot maes at celeonet dot fr
Status: Open
Bug Type: cURL related
Operating System: Linux
PHP Version: 4.3.9
New Comment:
Sorry for the double post. My browser has crashed at this moment of my
submit
Previous Comments:
------------------------------------------------------------------------
[2004-10-29 10:43:45] tony2001@php.net
Sorry, this one should be open =)
I do think it should be fixed and no, this is not a cURL problem.
------------------------------------------------------------------------
[2004-10-29 10:38:02] tony2001@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
.
------------------------------------------------------------------------
[2004-10-29 10:21:17] guillaume dot maes at celeonet dot fr
Description:
------------
PHP cURL functions bypass open_basedir
protection, so users can navigate through
filesystem.
For example, setting "open_basedir" in php.ini to
"/var/www/html" anybody can retrieve "/etc/parla"
using cURL functions
This vulnerability has been discovered wednesday
:http://www.securitytrap.com/mail/bugtraq/2004/Oct/0287.html
Reproduce code:
---------------
<?php
$ch = curl_init("file:///etc/parla");
$file=curl_exec($ch);
echo $file
?>
Expected result:
----------------
The execution of the file /etc/parla is not allowed because the value
of openbase_dir restriction is /var/www/html.
Actual result:
--------------
The file /etc/parla is executed.
If /etc/parla contents :
<body><html> Test of vulnerability </html></body>
The execution of this code with cURL functions showns the message.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30609&edit=1