Skip to content
skopnix

CVE-2012-1823

PHP PHP

On CISA's KEV list 3605 days after disclosure; 16 public exploits.

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 required action (federal due date 15 Apr 2022): Apply updates per vendor instructions.

Signals

KEV, exploited in the wild
yes, added 25 Mar 2022, due 15 Apr 2022
EPSS, 30-day forecast
100%, 100th percentile (as of 18 Nov 2026)
CVSS, NVD
not stated
Internet exposure
not stated

KEV is an observation, EPSS a forecast; KEV outranks it. No score published by NVD.

Timeline 4 May 2012 to today

3,605 days from disclosure to the KEV listing
2014201520162017201820192020202120242025First PoC 4 May 2012Metasploit 4 May 2012Disclosed 11 May 2012KEV 25 Mar 2022today
  1. First PoC
  2. Metasploitsame day
  3. Disclosed+7 d
  4. KEV+3605 d

3,605 days from disclosure to the KEV listing

Indicators none tied yet

No threat feed has tied an indicator to this CVE yet. Checked every six hours.

On the wire 0 dispatches

No dispatch on our wire has named this CVE yet.

Public exploit code 16 known · links only

GitHub PoCs 11Metasploit 1Exploit-DB 4

GitHub PoCs, by trust then stars11

  1. first seen by skopnix 18 Oct 2026

  2. first seen by skopnix 18 Oct 2026

  3. first seen by skopnix 18 Oct 2026

  4. first seen by skopnix 18 Oct 2026

  5. first seen by skopnix 18 Oct 2026

  6. first seen by skopnix 18 Oct 2026

  7. first seen by skopnix 18 Oct 2026

  8. first seen by skopnix 18 Oct 2026

Show 3 more
  1. first seen by skopnix 18 Oct 2026

  2. first seen by skopnix 18 Oct 2026

  3. first seen by skopnix 18 Oct 2026

Fake proof-of-concept repositories have been used to deliver malware to the researchers who run them. The trust verdict is our engine's heuristic over the repository (account age, what it ships, how its stars arrived); it is a reason to read the code first, not a finding about its author.

Metasploit1

  1. When run as a CGI, PHP up to version 5.3.12 and 5.4.2 is vulnerable to an argument injection vulnerability. This module takes advantage of the -d flag to set php.ini directives to achieve code execution. From the advisory: "if there is NO unescaped '=' in the query string, the string is split on '+' (encoded space) characters, urldecoded, passed to a function that escapes shell metacharacters (the "encoded in a system-defined manner"

    ruby · first seen by skopnix 18 Oct 2026

Exploit-DB4

  1. created 4 May 2012

  2. created 5 May 2012

  3. created 29 Oct 2013

  4. created 31 Oct 2013

Nuclei detection templates1

  1. 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.

    yaml · first seen by skopnix 18 Oct 2026

A Nuclei template is a scanner check that detects the flaw. It is not an exploit and is not counted as one.

References

Watch this one?

KEV additions reach Telegram and the KEV-only RSS as they land.

Telegram ↗KEV RSSAPIStack check