CVE-2012-1823KEV · OVERDUE

PHP-CGI Query String Parameter Vulnerability

Critical · published May 11, 2012

Patch now

Confirmed exploited, and the score agrees

CVSS calls it critical at 9.8. It is confirmed in active exploitation. It sits in the 100.0th percentile for exploit probability.

1651
days past CISA
deadline
CVSS v3.1
9.8
EPSS
100%
Percentile
100.0
In the wild
Confirmed
What it is

🚨 A sneaky little omission is all it takes for remote attackers to execute arbitrary code on your server! This critical bug in PHP affects versions before 5.3.12 and 5.4.x before 5.4.2 when configured as a CGI script. 🔥 Think of it like a restaurant that takes orders but forgets to check if every dish has a proper ingredient list. Without that crucial '=' sign in the query string, attackers can slip in their own ingredients, potentially wreaking havoc in the kitchen! An attacker could exploit this vulnerability to execute arbitrary commands on the server, leading to devastating consequences like unauthorized access to sensitive data, complete control of the server, or even the destruction of important files. If your server is running an affected version of PHP, it’s like leaving the back door unlocked and inviting trouble!

Put simply

Think of it like a restaurant that takes orders but forgets to check if every dish has a proper ingredient list. Without that crucial '=' sign in the query string, attackers can slip in their own ingredients, potentially wreaking havoc in the kitchen! This vulnerability arises because PHP fails to properly handle query strings lacking an '=' sign in CGI configurations. As a result, an attacker can inject command-line options directly into the request, executing arbitrary code on the server.

What to do

An attacker could exploit this vulnerability to execute arbitrary commands on the server, leading to devastating consequences like unauthorized access to sensitive data, complete control of the server, or even the destruction of important files. If your server is running an affected version of PHP, it’s like leaving the back door unlocked and inviting trouble! To secure your system, immediately upgrade PHP to version 5.3.12 or 5.4.2 or later. Additionally, review your server configurations to ensure CGI scripts are not misconfigured and consider implementing input validation to block malformed requests. You've got this! Follow these steps and you’ll have your server locked down tight in no time. 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.99998 · 100.0th percentile
Published
2012-05-11T10:00Z
KEV added
2022-03-25 · due 2022-04-15
EPSS history
Timeline
  • 25 MAR 00:00Z
    Added to CISA KEV — remediate by Apr 15
    kev
  • 11 MAY 10:00Z
    sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle query strings that…
    cvelistv5