What’s Vulnerable › Vulnerabilities
CVE-2004-0542
- Severity: critical (CVSS 10.0 v2.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 31.1% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2004-08-06 · updated 2026-06-16
Description
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 products
- PHP: before 4.3.7 — fixed in 4.3.7
How to fix
Upgrade to a fixed version: PHP 4.3.7. Check the vendor advisory for mitigations.
References
- http://www.idefense.com/application/poi/display?id=108
- http://www.php.net/release_4_3_7.php
- https://exchange.xforce.ibmcloud.com/vulnerabilities/16331
- http://www.idefense.com/application/poi/display?id=108
- http://www.php.net/release_4_3_7.php
- https://exchange.xforce.ibmcloud.com/vulnerabilities/16331
Get alerted when CVE-2004-0542 or the next vulnerability affects your stack