CVE-2006-5178

PHP < 5.1.6 - Race Condition in Symlink Function

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2006-5178.

AI-analyzed exploit summary This PHP script exploits a symlink() open_basedir bypass vulnerability in PHP 5.2.12 and 5.3.1 by creating a series of nested directories and symlinks to bypass directory restrictions. It allows an attacker to create arbitrary symlinks outside the intended directory, potentially leading to unauthorized file access.

Description

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.

Exploits (1)

exploitdb WORKING POC
phplocalphp
https://www.exploit-db.com/exploits/10557

This PHP script exploits a symlink() open_basedir bypass vulnerability in PHP 5.2.12 and 5.3.1 by creating a series of nested directories and symlinks to bypass directory restrictions. It allows an attacker to create arbitrary symlinks outside the intended directory, potentially leading to unauthorized file access.

Classification
Working Poc 95%
Attack Type
Auth Bypass
Complexity
Moderate
Reliability
Reliable
Target: PHP 5.2.12, PHP 5.3.1
No auth needed
Prerequisites: Write access to the target directory · PHP 5.2.12 or 5.3.1 with open_basedir restrictions
mistral-large-3 · analyzed Feb 19, 2026 Full analysis →

References (15)

Core 15
Core References
Third Party Advisory, VDB Entry vendor-advisory x_refsource_openpkg
http://www.securityfocus.com/archive/1/448953/100/0/threaded
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/447649/100/0/threaded
Various Sources vendor-advisory x_refsource_turbo
http://www.turbolinux.com/security/2006/TLSA-2006-38.txt
Exploit vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/20326
Third Party Advisory third-party-advisory x_refsource_sreason
http://securityreason.com/securityalert/1692
Exploit, Vendor Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/22235
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/448020/100/0/threaded
Third Party Advisory vdb-entry x_refsource_vupen
http://www.vupen.com/english/advisories/2006/3901
Third Party Advisory, VDB Entry vdb-entry x_refsource_xf
https://exchange.xforce.ibmcloud.com/vulnerabilities/29340
Vendor Advisory vendor-advisory x_refsource_mandriva
http://www.mandriva.com/security/advisories?name=MDKSA-2006:185
Exploit, Vendor Advisory x_refsource_misc
http://www.hardened-php.net/advisory_082006.132.html
Exploit vdb-entry x_refsource_sectrack
http://securitytracker.com/id?1016977
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/22424

Scores

EPSS 0.0068
EPSS Percentile 48.8%

Details

CWE
CWE-362
Status published
Products (43)
php/php 4.0
php/php 4.0.1 (3 CPE variants)
php/php 4.0.2
php/php 4.0.3 patch1
php/php 4.0.4
php/php 4.0.5
php/php 4.0.6
php/php 4.0.7 (4 CPE variants)
php/php 4.1.0
php/php 4.1.1
... and 33 more
Published Oct 10, 2006
Tracked Since Feb 18, 2026