CVE-2012-1823

PHP: PHP-CGI Query String Parameter

As of , CVE-2012-1823 in PHP is on CISA's list of exploited vulnerabilities: CISA listed it on . Our patch-first group: Patch this week.

Exploited
Yes: CISA listed it on 25 March 2022
US federal deadline
15 April 202221 days after CISA listed it. US federal civilian agencies must fix it by then.
Used in ransomware campaigns
Not known to CISA
EPSS score
0.99Higher than 99% of the CVEs EPSS scores. EPSS estimates the chance of exploitation activity in the next 30 days.
EPSS when listed
0.93 on 25 March 2022EPSS on the day CISA listed it.
Public exploit
1 Metasploit module and 4 Exploit-DB entries (3 verified)
Fix
No vendor link in CISA's entry

What CISA says to do

Apply updates per vendor instructions.

CISA's required action

What the flaw is

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.

CISA's description

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.

The CVE record's description, from certcc

CVE published
11 May 2012
Assigned by
certcc
CVSS
9.8 Critical (CVSS 3.1, from CISA-ADP)
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
CWE-20
Improper Input Validation
CISA SSVC, exploitation
active
CISA SSVC, automatable
yes
CISA SSVC, technical impact
total

Timeline

  1. Exploit-DB published an exploit (EDB-ID 18834).
  2. Exploit-DB published an exploit (EDB-ID 18836).
  3. The CVE record was published.
  4. Exploit-DB published an exploit (EDB-ID 29290).
  5. Exploit-DB published an exploit (EDB-ID 29316).
  6. CISA added it to its list of exploited vulnerabilities.
  7. The US federal deadline to fix it.

Public exploits

Facts from Metasploit's module list and Exploit-DB's index; we never copy exploit code.

Read further