BLACKOUT MAP

PHP · PHP

CVE-2012-1823

PHP-CGI Query String Parameter Vulnerability

Exploited in attacks Critical 9.8 Attack chance: >99.9%
Share

What it is

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 lack an = (equals sign) character, which allows remote attackers to execute arbitrary code by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'd' case.

CISA: sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.

Added to the CISA list
March 25, 2022
Published
May 11, 2012
Severity
Critical 9.8 CVSS 3.1
Chance of attacks in the next 30 days (EPSS)
>99.9% in the top 0.1% of all known vulnerabilities
Weakness
CWE-20
More details
NVD · CVE.org · CISA
All references (20)

More exploited flaws from PHP

AddedVulnerabilityProductSeverityAttack chance
Jul 7, 2025Command InjectionCVE-2016-10033PHPMailerCritical 9.899.7%
Mar 25, 2022Buffer OverflowCVE-2019-11043used by ransomwareFastCGI Process Manager (FPM)High 8.799.7%

All of them →

Sources: Known Exploited Vulnerabilities (CISA, public domain), CVE records (cve.org) and EPSS (FIRST). The chance of attacks is the EPSS estimate that someone will try to exploit the flaw in the next 30 days.