Secunia Logo
 
PHP Trailing Slash "open_basedir" Security Bypass
Secunia Advisory: SA16971
Release Date: 2005-09-27
Last Update: 2005-11-28
Popularity: 14,143 views

Critical:
Not critical
Impact: Security Bypass
Where: Local system
Solution Status: Vendor Patch

Software:PHP 4.4.x
PHP 5.0.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2005-3054


Description:
thorben has discovered a security issue in PHP, which can be exploited by malicious, local users to access certain files outside the "open_basedir" root.

The security issue is caused due to fopen wrappers not correctly obeying the "open_basedir" directive, which is designed to restrict PHP scripts in certain environments from accessing files outside the defined prefix. This can be exploited to access files in directories outside the "open_basedir" root as if a trailing slash on the "open_basedir" value is not taken into account.

Example:
Files in the "/user/test11/" directory can be accessed with the "open_basedir" root set to "/user/test1/", but not files in the "/user/test2/" directory.

The security issue has been confirmed in version 4.4.0 and 5.0.5. Other versions may also be affected.

Solution:
Update to version 4.4.1 or 5.1.0.
http://www.php.net/downloads.php

Provided and/or discovered by:
thorben

Changelog:
2005-10-31: Updated "Solution" section.
2005-11-28: Updated "Solution" section.

Original Advisory:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323585


Track this Secunia Advisory
Customers of the Secunia Vulnerability Intelligence solutions will automatically receive updates when new information regarding this advisory is released.

Read more about our Vulnerability Intelligence solutions and what they can do for you and your company.

About this Secunia Advisory
Please note: The information that this Secunia Advisory is based on comes from a third party unless stated otherwise.

Secunia collects, validates, and verifies all vulnerability reports issued by security research groups, vendors, and others.
  
Latest Advisories

Send Feedback to Secunia
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.

Ideas, suggestions, and other feedback are most welcome.

Most Popular - 3 Hours

1. Sun Java JDK / JRE Multiple Vulnerabilities // 110 views
2. VLC Media Player Real Demuxer Integer Overflow Vulnerability // 85 views
3. Microsoft Office Communications Server SIP INVITE Denial of Service // 62 views
4. RakhiSoftware Shopping Cart Multiple Vulnerabilities // 50 views
5. Adobe Flash Player Multiple Security Issues and Vulnerabilities // 44 views
6. Active Photo Gallery "username" and "password" SQL Injection // 40 views
7. Lito Lite CMS "cid" SQL Injection Vulnerability // 38 views
8. Basic PHP CMS "id" SQL Injection Vulnerability // 37 views
9. Bluo CMS "id" SQL Injection Vulnerability // 36 views
10. Mozilla Firefox 3 Multiple Vulnerabilities // 36 views