CVE-2004-0542

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…

published June 10, 2004

CVSS
—
EPSS
31%
Percentile
98.3
In the wild
Unconfirmed
What it is

⚠️ A clever combination of shell metacharacters can unleash havoc! PHP on Win32 platforms pre-4.3.7 doesn’t filter certain characters, letting attackers run arbitrary commands like a mischievous chef bypassing the kitchen rules. 🍴 Think of it like a restaurant where anyone can slip a sneaky ingredient into a recipe without the chef checking. The mismanaged kitchen allows anyone with a bit of slyness to add whatever they want, resulting in potentially disastrous dishes! An attacker could exploit this flaw to execute malicious code, overwrite critical files, or access sensitive environment variables. This could lead to unauthorized access, data corruption, and a whole lot of trouble for your system. 🙀

Put simply

Think of it like a restaurant where anyone can slip a sneaky ingredient into a recipe without the chef checking. The mismanaged kitchen allows anyone with a bit of slyness to add whatever they want, resulting in potentially disastrous dishes! This vulnerability arises because PHP's escapeshellcmd and escapeshellarg functions fail to properly filter certain shell metacharacters like '%', '|', or '>', allowing for command execution or file manipulation.

What to do

An attacker could exploit this flaw to execute malicious code, overwrite critical files, or access sensitive environment variables. This could lead to unauthorized access, data corruption, and a whole lot of trouble for your system. 🙀 Upgrade to PHP version 4.3.7 or later to mitigate this issue. Also, consider reviewing your code for secure handling of shell commands and implementing additional input validation to prevent similar vulnerabilities. 🛡️ You've got this! With a bit of diligence, your system can be fortified and running smoothly in no time! 🚀

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.31108 · 98.3th percentile
Published
2004-06-10T04:00Z
EPSS history
Timeline
  • 10 JUN 04:00Z
    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…
    cvelistv5