All vulnerabilities

Servers and applications

CVE-2006-5178

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…

Severity
Medium 6.2
Published
10 Oct 2006
Last changed
16 Jun 2026
Added to UpHeron
14 Oct 2026
Exploit chance
0.7% in the next 30 daysHigher than 52% of CVEs. EPSS by FIRST, 12 Nov 2026
Weakness
Race condition (CWE-362)
Attack
Needs local access · Only under certain conditions · No login needed
Attacker can
Read data · Change data · Take it down
CVSS vector
AV:L/AC:H/Au:N/C:C/I:C/A:C
Sources
NVD

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.

From NVD.

Affected software

SoftwareAffected versions
PHPServers and applications · cpe:a:php:php
  • Version 5.1.5
  • Version 5.1.4
  • Version 5.1.3
  • Version 5.1.2
All 53 release lines
  • Every version up to 5.1.6
  • Version 4.0
  • Version 4.0.1
  • Version 4.0.1-patch1
  • Version 4.0.1-patch2
  • Version 4.0.2
  • Version 4.0.3-patch1
  • Version 4.0.4
  • Version 4.0.5
  • Version 4.0.6
  • Version 4.0.7-rc1
  • Version 4.0.7-rc2
  • Version 4.0.7-rc3
  • Version 4.0.7
  • Version 4.1.0
  • Version 4.1.1
  • Version 4.1.2
  • Version 4.2
  • Version 4.2.1
  • Version 4.2.2
  • Version 4.2.3
  • Version 4.3.0
  • Version 4.3.1
  • Version 4.3.2
  • Version 4.3.3
  • Version 4.3.4
  • Version 4.3.5
  • Version 4.3.6
  • Version 4.3.7
  • Version 4.3.8
  • Version 4.3.9
  • Version 4.3.10
  • Version 4.3.11
  • Version 4.4.0
  • Version 4.4.1
  • Version 4.4.2
  • Version 4.4.3
  • Version 4.4.4
  • Version 5.0-rc1
  • Version 5.0-rc2
  • Version 5.0-rc3
  • Version 5.0.0
  • Version 5.0.1
  • Version 5.0.2
  • Version 5.0.3
  • Version 5.0.4
  • Version 5.0.5
  • Version 5.1.0
  • Version 5.1.1
  • Version 5.1.2
  • Version 5.1.3
  • Version 5.1.4
  • Version 5.1.5

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2006-5178
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2006-5178