CVE Catalog

CVE-2004-0542

High
Published: Translated: NVD NIST

Summary

Vulnerability in PHP on Win32 platforms before version 4.3.7 allows attackers to execute arbitrary code, overwrite files, and access internal environment variables remotely or locally. The issue stems from improper filtering of shell metacharacters such as '%', '|', and '>' in the escapeshellcmd and escapeshellarg functions.

Risk Assessment

An attacker can exploit this vulnerability to gain control over the server, modify critical files, or steal sensitive environmental data, posing a serious threat to system integrity and confidentiality.

Recommendation

Immediately upgrade PHP to version 4.3.7 or later. If an upgrade is not possible, restrict access to applications using the escapeshellcmd and escapeshellarg functions and implement additional input filtering mechanisms.

Related vulnerabilities

Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS