php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30610 cURL functions bypass open_basedir
Submitted: 2004-10-29 10:23 UTC Modified: 2004-10-29 10:38 UTC
From: guillaume dot maes at celeonet dot fr Assigned:
Status: Not a bug Package: cURL related
PHP Version: 4.3.9 OS: Linux
Private report: No CVE-ID: None
 [2004-10-29 10:23 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-29 10:38 UTC] derick@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.

#30609
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 14:01:25 2019 UTC