CVE-2004-0542 Command injection in n/a

Critical 10.0 Published Updated

Insufficient filtering of shell metacharacters in PHP escapeshell functions allows attackers to execute arbitrary code and access environment variables.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2004-0542?

CVE-2004-0542 is a critical command injection vulnerability in Php Php, published on 10 Jun 2004. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Which versions are affected by CVE-2004-0542?

It affects 1 product.

Products include Php Php.

How do I fix CVE-2004-0542?

No fix has been published for CVE-2004-0542 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2004-0542 being exploited?

There is no known exploitation of CVE-2004-0542 in the wild and no public exploit code.

All Php Php vulnerabilities

Sources

Also known as GHSA-ccf6-wjg8-65fx.

Is CVE-2004-0542 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free