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
- Exploit-DB published an exploit (EDB-ID 18834).
- Exploit-DB published an exploit (EDB-ID 18836).
- The CVE record was published.
- Exploit-DB published an exploit (EDB-ID 29290).
- Exploit-DB published an exploit (EDB-ID 29316).
- CISA added it to its list of exploited vulnerabilities.
- 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.
- Metasploit: PHP CGI Argument Injectionexploit module, rank excellent
- Exploit-DB: Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code ExecutionEDB-ID 29290, verified by Exploit-DB, 29 October 2013
- Exploit-DB: PHP < 5.3.12 / < 5.4.2 - CGI Argument InjectionEDB-ID 18836, verified by Exploit-DB, 5 May 2012
- Exploit-DB: PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)EDB-ID 18834, verified by Exploit-DB, 4 May 2012
- Exploit-DB: Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + ScannerEDB-ID 29316, 31 October 2013
Read further
- CVE recordcve.org
- NVD entrynvd.nist.gov
- CISA's catalogcisa.gov
- EPSS for this CVEapi.first.org