PHP up to 5.1.x open_basedir race condition

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.9$0-$5k0.00

Summaryinfo

A vulnerability marked as critical has been reported in PHP up to 5.1.x. This affects the function open_basedir. This manipulation causes race condition. This vulnerability is tracked as CVE-2006-5178. Moreover, an exploit is present. It is suggested to upgrade the affected component.

Detailsinfo

A vulnerability has been found in PHP up to 5.1.x (Programming Language Software) and classified as critical. Affected by this vulnerability is the function open_basedir. The manipulation with an unknown input leads to a race condition vulnerability. The CWE definition for the vulnerability is CWE-362. The product contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. As an impact it is known to affect confidentiality, and integrity. The summary by CVE is:

Race condition in the symlink function in PHP 5.1.6 and earlier allows local users to bypass the open_basedir restriction by using a combination of symlink, mkdir, and unlink functions to change the file path after the open_basedir check and before the file is opened by the underlying system, as demonstrated by symlinking a symlink into a subdirectory, to point to a parent directory via .. (dot dot) sequences, and then unlinking the resulting symlink.

The bug was discovered 10/03/2006. The weakness was disclosed 10/04/2006 by Stefan Esser with Hardened PHP Project (Website). It is possible to read the advisory at hardened-php.net. This vulnerability is known as CVE-2006-5178 since 10/05/2006. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details and also a public exploit are known.

After 5 days, there has been an exploit disclosed. It is possible to download the exploit at hardened-php.net. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 1 days. During that time the estimated underground price was around $5k-$25k. The vulnerability scanner Nessus provides a plugin with the ID 17717 (PHP Symlink Function Race Condition open_basedir Bypass), which helps to determine the existence of the flaw in a target environment. It is assigned to the family CGI abuses and running in the context r.

Upgrading eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at php.net. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published 1 days after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at X-Force (29340), Exploit-DB (10557), Tenable (17717), SecurityFocus (BID 20326†) and OSVDB (29495†). The entry VDB-3288 is pretty similar. Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Productinfo

Type

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.5
VulDB Meta Temp Score: 5.9

VulDB Base Score: 6.5
VulDB Temp Score: 5.9
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Race condition
CWE: CWE-362
CAPEC: 🔍
ATT&CK: 🔍

Physical: Partially
Local: Yes
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 17717
Nessus Name: PHP Symlink Function Race Condition open_basedir Bypass
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍

OpenVAS ID: 57462
OpenVAS Name: FreeBSD Ports: php4, php5
OpenVAS File: 🔍
OpenVAS Family: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍

Patch: php.net

Timelineinfo

10/03/2006 🔍
10/03/2006 +0 days 🔍
10/03/2006 +0 days 🔍
10/04/2006 +1 days 🔍
10/04/2006 +0 days 🔍
10/04/2006 +0 days 🔍
10/04/2006 +0 days 🔍
10/05/2006 +0 days 🔍
10/05/2006 +0 days 🔍
10/05/2006 +0 days 🔍
10/09/2006 +4 days 🔍
10/10/2006 +1 days 🔍
02/28/2007 +141 days 🔍
11/18/2011 +1724 days 🔍
04/23/2026 +5270 days 🔍

Sourcesinfo

Product: php.org

Advisory: hardened-php.net
Researcher: Stefan Esser
Organization: Hardened PHP Project
Status: Confirmed

CVE: CVE-2006-5178 (🔍)
GCVE (CVE): GCVE-0-2006-5178
GCVE (VulDB): GCVE-100-2587
X-Force: 29340 - PHP symlink() open_basedir security bypass, Medium Risk
SecurityFocus: 20326 - PHP Symbolic Link Open_Basedir Bypass Vulnerability
Secunia: 22235 - PHP "open_basedir" Symlink Security Bypass Vulnerability, Less Critical
OSVDB: 29495 - PHP Symlink Function Race Condition open_basedir Bypass
SecurityTracker: 1016977
Vulnerability Center: 14450 - PHP Restriction Bypass due to Race Condition in the symlink Function, Medium
Vupen: ADV-2006-3901

scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍

Entryinfo

Created: 10/05/2006 13:04
Updated: 04/23/2026 18:28
Changes: 10/05/2006 13:04 (105), 07/15/2019 18:58 (1), 06/08/2025 10:38 (23), 04/23/2026 18:28 (2)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!