Input validation error in PHP - CVE-2004-0542

 

Input validation error in PHP - CVE-2004-0542

Published: July 1, 2022 / Updated: June 8, 2025


Vulnerability identifier: #VU110521
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-0542
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.

PHP before 4.3.7 on Win32 platforms does not properly filter all shell metacharacters, which allows local or remote attackers to execute arbitrary code, overwrite files, and access internal environment variables via (1) the "%", "|", or ">" characters to the escapeshellcmd function, or (2) the "%" character to the escapeshellarg function.


Affected software

PHP

How to mitigate CVE-2004-0542

Install update from vendor's website.

PHP - update to 4.3.7

External References

Related Security Bulletins