{"id":"CVE-2012-2311","url":"https://www.cyber-defence.io/tools/cve/CVE-2012-2311","generatedAt":"2026-10-27T18:47:03.960Z","title":"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…","description":"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.","published":"2012-05-11T10:15:48.000Z","lastModified":"2026-06-16T23:41:20.000Z","status":"Modified","sourceIdentifier":"secalert@redhat.com","cvss":{"version":"2.0","score":7.5,"severity":"HIGH","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P"},"cwe":["CWE-89"],"affected":["php/php"],"epss":{"score":0.69266,"percentile":0.99352,"date":"2026-10-26","history":[]},"kev":{"listed":false},"exploits":{"count":4,"verified":true,"firstPublished":"2012-05-04","source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[{"edbId":29316,"kind":"exploit","title":"Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner","url":"https://www.exploit-db.com/exploits/29316","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/remote/29316.py","file":"exploits/php/remote/29316.py","published":"2013-10-31","added":"2013-10-31","updated":"2013-11-12","author":"noptrix","type":"remote","platform":"php","port":null,"verified":false,"codes":["CVE-2012-2336","CVE-2012-2311","CVE-2012-1823","OSVDB-81633"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":null},{"edbId":29290,"kind":"exploit","title":"Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution","url":"https://www.exploit-db.com/exploits/29290","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/remote/29290.c","file":"exploits/php/remote/29290.c","published":"2013-10-29","added":"2013-10-29","updated":"2014-05-16","author":"kingcope","type":"remote","platform":"php","port":80,"verified":true,"codes":["CVE-2012-2336","CVE-2012-2311","CVE-2012-1823","OSVDB-81633"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":null},{"edbId":18836,"kind":"exploit","title":"PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection","url":"https://www.exploit-db.com/exploits/18836","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/remote/18836.py","file":"exploits/php/remote/18836.py","published":"2012-05-05","added":"2012-05-05","updated":"2012-05-08","author":"rayh4c","type":"remote","platform":"php","port":null,"verified":true,"codes":["CVE-2012-2336","CVE-2012-2311","CVE-2012-1823","OSVDB-81633"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":null},{"edbId":18834,"kind":"exploit","title":"PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)","url":"https://www.exploit-db.com/exploits/18834","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/remote/18834.rb","file":"exploits/php/remote/18834.rb","published":"2012-05-04","added":"2012-05-05","updated":"2016-12-01","author":"Metasploit","type":"remote","platform":"php","port":null,"verified":true,"codes":["CVE-2012-2336","OSVDB-81633","CVE-2012-2311","CVE-2012-1823"],"tags":"Metasploit Framework (MSF)","aliases":null,"applicationUrl":null,"screenshotUrl":"http://www.exploit-db.com/screenshots/idlt19000/screen-shot-2012-05-08-at-50147-pm.png","referenceUrl":"http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/"}]},"verdict":{"level":"urgent","text":"EPSS puts the probability of exploitation in the next 30 days at 69.3%, higher than 99% of all known CVEs. Patch or mitigate before the next change window."},"changes":[],"references":[{"url":"http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/","source":"secalert@redhat.com"},{"url":"http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html","source":"secalert@redhat.com"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html","source":"secalert@redhat.com"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html","source":"secalert@redhat.com"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html","source":"secalert@redhat.com"},{"url":"http://marc.info/?l=bugtraq&m=134012830914727&w=2","source":"secalert@redhat.com"},{"url":"http://secunia.com/advisories/49014","source":"secalert@redhat.com"},{"url":"http://secunia.com/advisories/49085","source":"secalert@redhat.com"},{"url":"http://support.apple.com/kb/HT5501","source":"secalert@redhat.com"},{"url":"http://www.debian.org/security/2012/dsa-2465","source":"secalert@redhat.com"},{"url":"http://www.kb.cert.org/vuls/id/520827","tags":["US Government Resource"],"source":"secalert@redhat.com"},{"url":"http://www.php.net/ChangeLog-5.php#5.4.3","source":"secalert@redhat.com"},{"url":"http://www.php.net/archive/2012.php#id2012-05-08-1","source":"secalert@redhat.com"},{"url":"http://www.securitytracker.com/id?1027022","source":"secalert@redhat.com"},{"url":"https://bugs.php.net/bug.php?id=61910","tags":["Vendor Advisory"],"source":"secalert@redhat.com"},{"url":"https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff-fix-check.patch&revision=1336093719&display=1","source":"secalert@redhat.com"},{"url":"https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862","source":"secalert@redhat.com"},{"url":"http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://marc.info/?l=bugtraq&m=134012830914727&w=2","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://secunia.com/advisories/49014","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://secunia.com/advisories/49085","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://support.apple.com/kb/HT5501","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.debian.org/security/2012/dsa-2465","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.kb.cert.org/vuls/id/520827","tags":["US Government Resource"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.php.net/ChangeLog-5.php#5.4.3","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.php.net/archive/2012.php#id2012-05-08-1","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.securitytracker.com/id?1027022","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugs.php.net/bug.php?id=61910","tags":["Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff-fix-check.patch&revision=1336093719&display=1","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862","source":"af854a3a-2127-422b-91ae-364da2661108"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2012-2311","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}