CVE-2012-1823
PHP-CGI Query String Parameter Vulnerability
PHP PHP
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.
Exploitation status
CISA Known Exploited Vulnerabilities
Listed by CISA on 25 March 2022. US federal agencies were required to remediate it by 15 April 2022.
EPSS — exploitation probability
FIRST puts the probability of exploitation activity in the next 30 days at 100%, which is higher than 99.9% of all scored vulnerabilities. EPSS is a forecast of activity, not a measure of severity, and it is rescored daily.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Frequently asked questions
Is CVE-2012-1823 being exploited by ransomware groups?
No ransomware group in this database is currently recorded as exploiting CVE-2012-1823.
What does CVE-2012-1823 affect?
CVE-2012-1823 affects PHP PHP. 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.
How severe is CVE-2012-1823?
CVE-2012-1823 is rated CRITICAL with a CVSS base score of 9.8. EPSS puts the probability of exploitation in the next 30 days at 100%, higher than 99.9% of all scored vulnerabilities. It is listed in the CISA Known Exploited Vulnerabilities catalog, with a federal remediation deadline of 15 April 2022.
How should organisations respond to CVE-2012-1823?
Apply the vendor patch for PHP PHP as the first priority, and treat any internet-facing instance as the most urgent. Because this vulnerability is associated with ransomware activity, also review whether the affected systems were reachable before patching, rather than assuming that patching alone closes the incident.