CVE-2012-2311 in the critical feed json
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 qu…
published 2012-05-11 14 y ago modified 2026-06-16 4 mo ago also EUVD-2012-2304
- cvss
- 7.5
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 69.3%
- EPSS 69.3% chance of exploitation in 30 days, percentile 99.3%
- public exploits
- 4
- Exploit-DB
Summary
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.
Patch / fix
- php7 openSUSE Tumbleweed 7.0.14-1.4
- php5 openSUSE Tumbleweed 5.6.28-1.1
opensuse advisories openSUSE-SU-2024:10290-1openSUSE-SU-2024:10344-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2012-2311 updated cvss 6.8
php: incomplete CVE-2012-1823 fix - incorrect check for =
-
Red Hat Enterprise Linux 4 php Red Hat Enterprise Linux 5 php, php53 Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- First public exploit (EDB-18834)
- Published
Exploit prediction
69.27% chance of exploitation in the next 30 days, higher than 99.3% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- EDB-29316 Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner remote, 2013-10-31
- EDB-29290 Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution remote, 2013-10-29
- EDB-18836 PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection remote, 2012-05-05
- EDB-18834 PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit) remote, 2012-05-04
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- Technology feeds
References
-
marc.info
/?l=bugtraq&m=134012830914727&w=2
vendor-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-05/msg00011.html
vendor-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-05/msg00002.html
vendor-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-05/msg00007.html
vendor-advisory
-
lists.apple.com
/archives/security-announce/2012/Sep/msg00004.html
vendor-advisory
-
h20564.www2.hp.com
/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
vendor-advisory
-
debian.org
/security/2012/dsa-2465
vendor-advisory
-
bugs.php.net
/bug.php?id=61910
vendor-advisory
-
securitytracker.com
/id?1027022
vdb-entry
- bugs.php.net /patch-display.php?bug_id=61910&patch=cgi.diff-fix-check.patch&revision=1336093719&display=1
-
secunia.com
/advisories/49014
third-party-advisory
- php.net /archive/2012.php#id2012-05-08-1
- support.apple.com /kb/HT5501
- eindbazen.net /2012/05/php-cgi-advisory-cve-2012-1823/
-
kb.cert.org
/vuls/id/520827
third-party-advisory, us-government-resource
-
secunia.com
/advisories/49085
third-party-advisory
- php.net /ChangeLog-5.php#5.4.3
Sources
- CVE List CVE-2012-2311
- NVD CVE-2012-2311
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.