{"id":"CVE-2012-1823","url":"https://www.cyber-defence.io/tools/cve/CVE-2012-1823","generatedAt":"2026-10-31T23:40:00.381Z","title":"PHP-CGI Query String Parameter Vulnerability","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.","published":"2012-05-11T10:15:48.000Z","lastModified":"2026-06-16T23:40:22.000Z","status":"Analyzed","sourceIdentifier":"cret@cert.org","cvss":{"version":"3.1","score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"cwe":["CWE-77"],"affected":["php/php","fedoraproject/fedora","debian/debian linux","hp/hp-ux","opensuse/opensuse","suse/linux enterprise server","suse/linux enterprise software development kit","apple/mac os x","redhat/application stack","redhat/gluster storage server for on-premise","redhat/storage","redhat/storage for public cloud","redhat/enterprise linux desktop","redhat/enterprise linux eus","redhat/enterprise linux server","redhat/enterprise linux server aus","redhat/enterprise linux workstation"],"epss":{"score":0.99998,"percentile":0.9999,"date":"2026-10-30","history":[]},"kev":{"listed":true,"dateAdded":"2022-03-25","dueDate":"2022-04-15","knownRansomwareCampaignUse":"Unknown","notes":"Apply updates per vendor instructions.\nhttps://nvd.nist.gov/vuln/detail/CVE-2012-1823"},"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":"Known to be exploited in the wild (CISA KEV, CISA remediation deadline 15 April 2022). Treat as an emergency change: patch or isolate now, then hunt for prior compromise."},"changes":[],"references":[{"url":"http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/","tags":["Broken Link","Exploit"],"source":"cret@cert.org"},{"url":"http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041","tags":["Broken Link"],"source":"cret@cert.org"},{"url":"http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html","tags":["Mailing List","Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html","tags":["Mailing List","Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html","tags":["Mailing List","Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html","tags":["Mailing List","Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://marc.info/?l=bugtraq&m=134012830914727&w=2","tags":["Mailing List"],"source":"cret@cert.org"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0546.html","tags":["Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0547.html","tags":["Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0568.html","tags":["Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0569.html","tags":["Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0570.html","tags":["Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://secunia.com/advisories/49014","tags":["Broken Link"],"source":"cret@cert.org"},{"url":"http://secunia.com/advisories/49065","tags":["Broken Link"],"source":"cret@cert.org"},{"url":"http://secunia.com/advisories/49085","tags":["Broken Link"],"source":"cret@cert.org"},{"url":"http://secunia.com/advisories/49087","tags":["Broken Link"],"source":"cret@cert.org"},{"url":"http://support.apple.com/kb/HT5501","tags":["Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://www.debian.org/security/2012/dsa-2465","tags":["Third Party Advisory"],"source":"cret@cert.org"},{"url":"http://www.kb.cert.org/vuls/id/520827","tags":["Exploit","Third Party Advisory","US Government Resource"],"source":"cret@cert.org"},{"url":"http://www.kb.cert.org/vuls/id/673343","tags":["Third Party Advisory","US Government Resource"],"source":"cret@cert.org"},{"url":"http://www.mandriva.com/security/advisories?name=MDVSA-2012:068","tags":["Broken Link"],"source":"cret@cert.org"},{"url":"http://www.openwall.com/lists/oss-security/2024/06/07/1","tags":["Mailing List"],"source":"cret@cert.org"},{"url":"http://www.php.net/ChangeLog-5.php#5.4.2","tags":["Exploit","Patch","Release Notes"],"source":"cret@cert.org"},{"url":"http://www.php.net/archive/2012.php#id2012-05-03-1","tags":["Release Notes"],"source":"cret@cert.org"},{"url":"http://www.securitytracker.com/id?1027022","tags":["Broken Link","Third Party Advisory","VDB Entry"],"source":"cret@cert.org"},{"url":"https://bugs.php.net/bug.php?id=61910","tags":["Exploit","Patch"],"source":"cret@cert.org"},{"url":"https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1","tags":["Patch"],"source":"cret@cert.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/","tags":["Mailing List","Release Notes"],"source":"cret@cert.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/","tags":["Mailing List","Release Notes"],"source":"cret@cert.org"},{"url":"http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/","tags":["Broken Link","Exploit"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041","tags":["Broken Link"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://marc.info/?l=bugtraq&m=134012830914727&w=2","tags":["Mailing List"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0546.html","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0547.html","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0568.html","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0569.html","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://rhn.redhat.com/errata/RHSA-2012-0570.html","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://secunia.com/advisories/49014","tags":["Broken Link"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://secunia.com/advisories/49065","tags":["Broken Link"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://secunia.com/advisories/49085","tags":["Broken Link"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://secunia.com/advisories/49087","tags":["Broken Link"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://support.apple.com/kb/HT5501","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.debian.org/security/2012/dsa-2465","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.kb.cert.org/vuls/id/520827","tags":["Exploit","Third Party Advisory","US Government Resource"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.kb.cert.org/vuls/id/673343","tags":["Third Party Advisory","US Government Resource"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.mandriva.com/security/advisories?name=MDVSA-2012:068","tags":["Broken Link"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.openwall.com/lists/oss-security/2024/06/07/1","tags":["Mailing List"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.php.net/ChangeLog-5.php#5.4.2","tags":["Exploit","Patch","Release Notes"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.php.net/archive/2012.php#id2012-05-03-1","tags":["Release Notes"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.securitytracker.com/id?1027022","tags":["Broken Link","Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugs.php.net/bug.php?id=61910","tags":["Exploit","Patch"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1","tags":["Patch"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/","tags":["Mailing List","Release Notes"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/","tags":["Mailing List","Release Notes"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/","tags":["Mailing List","Release Notes"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2012-1823","tags":["US Government Resource"],"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2012-1823","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."}