CVE-2012-2311
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 ...
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.
Exploit likelihood
What each source reports
NVD Score used
7.5
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.
- Record
CVE-2012-2311- CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-89
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2012-2311- Updated
- 2026-11-02
EUVDEUVD-2012-2304 No score
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.
- Record
EUVD-2012-2304- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-9c8w-rvgj-w489 No score
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 ...
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.
- Record
GHSA-9c8w-rvgj-w489- Weakness
- CWE-89
- Updated
- 2026-11-02
OSVBELL-CVE-2012-2311
7.5
CVE-2012-2311 does not affect BellSoft software
- Record
BELL-CVE-2012-2311- CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10290-1 No score
apache2-mod_php7-7.0.14-1.4 on GA media
These are all security issues fixed in the apache2-mod_php7-7.0.14-1.4 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10290-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10344-1 No score
apache2-mod_php5-5.6.28-1.1 on GA media
These are all security issues fixed in the apache2-mod_php5-5.6.28-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10344-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
php5Debian:6.0 |
before 5.3.3-7+squeeze9, plus listed versions 5.3.3-75.3.3-7+squeeze15.3.3-7+squeeze25.3.3-7+squeeze35.3.3-7+squeeze55.3.3-7+squeeze65.3.3-7+squeeze75.3.3-7+squeeze8 |
5.3.3-7+squeeze9 |
php7openSUSE:Tumbleweed |
before 7.0.14-1.4 | 7.0.14-1.4 |
php5openSUSE:Tumbleweed |
before 5.6.28-1.1 | 5.6.28-1.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Exploit-DB | PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit) | 2012-05-04 |
| Exploit-DB | PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection | 2012-05-05 |
| Exploit-DB | Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution | 2013-10-29 |
| Exploit-DB | Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner | 2013-10-31 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, Exploit-DB, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2012-2311 is a high vulnerability (CVSS 7.5) in Php, published May 9, 2012. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 69.3%, the 99th percentile. Fixed in php5 5.3.3-7+squeeze9.
References
marc.info?l=bugtraq&m=134012830914727&w=2
lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
securitytracker.com/id?1027022
lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff-fix-check.patch&revision=1336093719&display=1
secunia.com/advisories/49014
Show 85 moreShow less
lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
bugs.php.net/bug.php?id=61910
php.net/archive/2012.php
lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
support.apple.com/kb/HT5501
h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823
kb.cert.org/vuls/id/520827
debian.org/security/2012/dsa-2465
secunia.com/advisories/49085
php.net/ChangeLog-5.php
nvd.nist.gov/vuln/detail/CVE-2012-2311
github.com/advisories/GHSA-9c8w-rvgj-w489
docs.bell-sw.com/security/cves/CVE-2012-2311
suse.com/security/cve/CVE-2006-7243
suse.com/security/cve/CVE-2010-2225
suse.com/security/cve/CVE-2010-2950
suse.com/security/cve/CVE-2010-3436
suse.com/security/cve/CVE-2010-3709
suse.com/security/cve/CVE-2010-3710
suse.com/security/cve/CVE-2010-4150
suse.com/security/cve/CVE-2010-4645
suse.com/security/cve/CVE-2011-0420
suse.com/security/cve/CVE-2011-0421
suse.com/security/cve/CVE-2011-0708
suse.com/security/cve/CVE-2011-1092
suse.com/security/cve/CVE-2011-1153
suse.com/security/cve/CVE-2011-1466
suse.com/security/cve/CVE-2011-2202
suse.com/security/cve/CVE-2011-3379
suse.com/security/cve/CVE-2011-4153
suse.com/security/cve/CVE-2011-4566
suse.com/security/cve/CVE-2011-4718
suse.com/security/cve/CVE-2011-4885
suse.com/security/cve/CVE-2012-0830
suse.com/security/cve/CVE-2012-1823
suse.com/security/cve/CVE-2012-2311
suse.com/security/cve/CVE-2012-2335
suse.com/security/cve/CVE-2012-2336
suse.com/security/cve/CVE-2012-2688
suse.com/security/cve/CVE-2012-3365
suse.com/security/cve/CVE-2013-1635
suse.com/security/cve/CVE-2013-1643
suse.com/security/cve/CVE-2013-1824
suse.com/security/cve/CVE-2013-4113
suse.com/security/cve/CVE-2013-4248
suse.com/security/cve/CVE-2013-6420
suse.com/security/cve/CVE-2013-6712
suse.com/security/cve/CVE-2013-7327
suse.com/security/cve/CVE-2013-7345
suse.com/security/cve/CVE-2014-0185
suse.com/security/cve/CVE-2014-0237
suse.com/security/cve/CVE-2014-0238
suse.com/security/cve/CVE-2014-1943
suse.com/security/cve/CVE-2014-2270
suse.com/security/cve/CVE-2014-2497
suse.com/security/cve/CVE-2014-3538
suse.com/security/cve/CVE-2014-3587
suse.com/security/cve/CVE-2014-3597
suse.com/security/cve/CVE-2014-3622
suse.com/security/cve/CVE-2014-3668
suse.com/security/cve/CVE-2014-3669
suse.com/security/cve/CVE-2014-3670
suse.com/security/cve/CVE-2014-4049
suse.com/security/cve/CVE-2014-4670
suse.com/security/cve/CVE-2014-4698
suse.com/security/cve/CVE-2014-5120
suse.com/security/cve/CVE-2014-5459
suse.com/security/cve/CVE-2014-9426
suse.com/security/cve/CVE-2014-9427
suse.com/security/cve/CVE-2015-0231
suse.com/security/cve/CVE-2015-0232
suse.com/security/cve/CVE-2015-0235
suse.com/security/cve/CVE-2015-0273
suse.com/security/cve/CVE-2015-1351
suse.com/security/cve/CVE-2015-1352
suse.com/security/cve/CVE-2015-2305
suse.com/security/cve/CVE-2015-2325
suse.com/security/cve/CVE-2015-2326
suse.com/security/cve/CVE-2015-2331
suse.com/security/cve/CVE-2015-3152
suse.com/security/cve/CVE-2015-3414
suse.com/security/cve/CVE-2015-3415
suse.com/security/cve/CVE-2015-3416
suse.com/security/cve/CVE-2015-4024