PHP 'tempnam()' Function 'MAXPATHLEN' Restriction Security Bypass Vulnerability

BID:49634

Info

PHP 'tempnam()' Function 'MAXPATHLEN' Restriction Security Bypass Vulnerability

Bugtraq ID: 49634
Class: Boundary Condition Error
CVE: CVE-2006-2660
Remote: No
Local: Yes
Published: Jun 11 2006 12:00AM
Updated: Jun 11 2006 12:00AM
Credit: Maksymilian Arciemowicz from SecurityReason
Vulnerable: PHP PHP 5.1.4
PHP PHP 5.1.3
PHP PHP 5.1.2
+ Ubuntu Ubuntu Linux 6.06 LTS sparc
+ Ubuntu Ubuntu Linux 6.06 LTS powerpc
+ Ubuntu Ubuntu Linux 6.06 LTS i386
+ Ubuntu Ubuntu Linux 6.06 LTS amd64
PHP PHP 5.1.1
PHP PHP 5.1
PHP PHP 5.0.5
PHP PHP 5.0.4
PHP PHP 5.0.3
+ Trustix Secure Linux 2.2
PHP PHP 5.0.2
PHP PHP 5.0.1
PHP PHP 5.0 .0
PHP PHP 4.4.2
PHP PHP 4.4.1
PHP PHP 4.4 .0
Not Vulnerable: PHP PHP 4.4.3
PHP PHP 5.2
+ Debian Linux 4.0 sparc
+ Debian Linux 4.0 s/390
+ Debian Linux 4.0 powerpc
+ Debian Linux 4.0 mipsel
+ Debian Linux 4.0 mips
+ Debian Linux 4.0 m68k
+ Debian Linux 4.0 ia-64
+ Debian Linux 4.0 ia-32
+ Debian Linux 4.0 hppa
+ Debian Linux 4.0 arm
+ Debian Linux 4.0 amd64
+ Debian Linux 4.0 alpha
+ Debian Linux 4.0

Discussion

PHP 'tempnam()' Function 'MAXPATHLEN' Restriction Security Bypass Vulnerability

PHP is prone to a security-bypass vulnerability.

Successful exploits could allow an attacker to bypass restrictions and create arbitrary PHP files with fixed file names in any writable directory.

This vulnerability would be an issue in shared-hosting configurations where multiple users can create and execute arbitrary PHP script code.

PHP 5.1.4 and 4.x prior to 4.4.3 are vulnerable; other versions may also be affected.

Exploit / POC

PHP 'tempnam()' Function 'MAXPATHLEN' Restriction Security Bypass Vulnerability

To exploit this issue, an attacker can use readily available tools.

Solution / Fix

PHP 'tempnam()' Function 'MAXPATHLEN' Restriction Security Bypass Vulnerability

Solution:
Updates are available. Please see the references for more information.

References

PHP 'tempnam()' Function 'MAXPATHLEN' Restriction Security Bypass Vulnerability

References:

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report