Input validation error in PHP - CVE-2004-1064

 

Input validation error in PHP - CVE-2004-1064

Published: December 8, 2020 / Updated: June 8, 2025


Vulnerability identifier: #VU110516
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2004-1064
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to execute arbitrary code.

The safe mode checks in PHP 4.x to 4.3.9 and PHP 5.x to 5.0.2 truncate the file path before passing the data to the realpath function, which could allow attackers to bypass safe mode. NOTE: this issue was originally REJECTed by its CNA before publication, but that decision is in active dispute. This candidate may change significantly in the future as a result of further discussion.


Affected software

PHP
Gentoo Linux
dev-php/php
dev-php/php-cgi

How to mitigate CVE-2004-1064

Install update from vendor's website.

PHP - addressed in versions 4.3.9, 5.0.2
dev-php/php - update to 4.3.10
dev-php/php-cgi - update to 4.3.10

External References

Related Security Bulletins