Remote code executionin CVE-2012-2311.
Proof of concept public (Exploit-DB).
sapi/cgi/cgi_main.c in PHP before 5.3.13 and 5.4.x before 5.4.3, when configured as a CGI script (aka php-cgi), does not properly handle query strings that contain a %3D sequence but no = (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. NOTE: this vulnerability exists because of an incomplete fix for CVE-2012-1823.
- No source names a fix yet. Watch this page or the product for updates; we never guess a fixed version.
Not confirmed by any source yet: affected versions not confirmed; fixed version not confirmed; severity not scored yet. 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
- 19 Apr 2012CVE ID reserved by redhat.
- 11 May 2012Published in the CVE List.
- 6 Aug 2024CVE record last updated.
Attack code anyone can find
Exploit maturity: Proof of concept (Exploit-DB).
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.
- marc.info vendor-advisory, x_refsource_HP
- lists.opensuse.org vendor-advisory, x_refsource_SUSE
- www.securitytracker.com vdb-entry, x_refsource_SECTRACK
- lists.opensuse.org vendor-advisory, x_refsource_SUSE
- bugs.php.net x_refsource_CONFIRM
- secunia.com third-party-advisory, x_refsource_SECUNIA
- lists.opensuse.org vendor-advisory, x_refsource_SUSE
- bugs.php.net x_refsource_CONFIRM
- www.php.net x_refsource_CONFIRM
- lists.apple.com vendor-advisory, x_refsource_APPLE
- support.apple.com x_refsource_CONFIRM
- h20564.www2.hp.com vendor-advisory, x_refsource_HP
- eindbazen.net x_refsource_MISC
- www.kb.cert.org third-party-advisory, x_refsource_CERT-VN
- www.debian.org vendor-advisory, x_refsource_DEBIAN
- secunia.com third-party-advisory, x_refsource_SECUNIA
- www.php.net x_refsource_CONFIRM
Patchminder. CVE-2012-2311: Remote code execution in CVE-2012-2311. https://patchminder.com/cve/cve-2012-2311/ (accessed 5 December 2026).