Description
Directory traversal vulnerability in file.c in PHP 4.4.2 and 5.1.2 allows local users to bypass open_basedir restrictions allows remote attackers to create files in arbitrary directories via the tempnam function.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 4 | php +13 | 4.3.9-3.15 | RHSA-2006:0568 |
| RHEL 3 | php +6 | 4.3.2-33.ent | RHSA-2006:0568 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php7 | 7.4.24-1.1 | openSUSE-SU-2024:11167-1 |
| openSUSE Tumbleweed | php8 | 8.0.11-1.1 | openSUSE-SU-2024:11169-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PHP 4.x - 'tempnam() open_basedir' Restriction Bypass EDB-27595 · remote · Apr 10, 2006 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- RHSA-2006:0568 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- openSUSE-SU-2024:11167-1 php7-7.4.24-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11169-1 php8-8.0.11-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- 21723 third-party-advisory
- https://issues.rpath.com/browse/RPL-683
- 19775 third-party-advisory
- 21252 third-party-advisory
- 21202 third-party-advisory
- 677 third-party-advisory
- php-tempnam-directory-traversal(25705) vdb-entry
- ADV-2006-1290 vdb-entry
- RHSA-2006:0568 vendor-advisory
- 21135 third-party-advisory
- USN-320-1 vendor-advisory
- 20061005 rPSA-2006-0182-1 php php-mysql php-pgsql mailing-list
- 19979 third-party-advisory
- RHSA-2006:0549 vendor-advisory
- 22225 third-party-advisory
- 21125 third-party-advisory
- 19599 third-party-advisory
- MDKSA-2006:074 vendor-advisory
- 20060408 tempnam() open_basedir bypass PHP 4.4.2 and 5.1.2 third-party-advisory
- 21031 third-party-advisory
- 1015881 vdb-entry
- RHSA-2006:0567 vendor-advisory
- http://support.avaya.com/elmodocs2/security/ASA-2006-175.htm
- oval:org.mitre.oval:def:10196 vdb-entry signature
- 17439 vdb-entry
- SUSE-SA:2006:024 vendor-advisory