|  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
PHP cURL functions bypass open_basedir
protection, so users can navigate through

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 :

Reproduce code:
$ch = curl_init("file:///etc/parla");
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.


Add a Patch

Pull Requests

Add a Pull Request


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

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 17:03:35 2021 UTC