Remote code executionin PHP.
On CISAThe US cyber defence agency. Its list names every hole it has seen used in real attacks.'s exploited list since 25 Mar 2022.
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.
- CISA requires US federal agencies to fix it by 15 Apr 2022.
Not confirmed by any source yet: affected versions not confirmed; fixed version not confirmed. We show these as not confirmed instead of guessing.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 21 Mar 2012CVE ID reserved by certcc.
- 3 May 2012Metasploit module: PHP CGI Argument Injection.
- 11 May 2012Published in the CVE List.
- 8 Sep 2015First public proof of concept on GitHub.
- 25 Mar 2022Added to CISA's Known Exploited Vulnerabilities list.
- 4 Nov 2025CVE record last updated.
Attack code anyone can find
Exploit maturity: Exploited in the wild (CISA KEV). CISA assessment (SSVC): exploitation active.
10 proof of concept repositories on GitHub. No fix or workaround is known yet, so we count them but do not link to them.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other PHP vulnerabilities
Same weakness: Command injection
- marc.info vendor-advisory
- lists.opensuse.org vendor-advisory
- www.securitytracker.com vdb-entry
- h20000.www2.hp.com vendor-advisory
- www.mandriva.com vendor-advisory
- lists.opensuse.org vendor-advisory
- rhn.redhat.com vendor-advisory
- rhn.redhat.com vendor-advisory
- rhn.redhat.com vendor-advisory
- www.php.net
- secunia.com third-party-advisory
- rhn.redhat.com vendor-advisory
- lists.opensuse.org vendor-advisory
- bugs.php.net
- www.kb.cert.org third-party-advisory
- rhn.redhat.com vendor-advisory
- lists.apple.com vendor-advisory
- support.apple.com
- eindbazen.net
- secunia.com third-party-advisory
- www.kb.cert.org third-party-advisory
- bugs.php.net
- www.debian.org vendor-advisory
- secunia.com third-party-advisory
- www.php.net
- secunia.com third-party-advisory
- www.openwall.com mailing-list
- lists.fedoraproject.org vendor-advisory
- lists.fedoraproject.org vendor-advisory
- lists.fedoraproject.org
Patchminder. CVE-2012-1823: Remote code execution in PHP. https://patchminder.com/cve/cve-2012-1823/ (accessed 5 December 2026).