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.
CVE-2012-2311
This CVE was only ever scored under CVSS v2.0. NVD CVSS v2.0 base 7.5 — v2 rates that HIGH (v2 bands: LOW 0.0–3.9 / MEDIUM 4.0–6.9 / HIGH 7.0–10.0; v2 has no CRITICAL band). Vector AV:N/AC:L/Au:N/C:P/I:P/A:P. CVSS v2 is an older, coarser metric than v3.1/v4.0 (no Scope, no User Interaction, no Attack Requirements), so it is not directly comparable to a v3 or v4 score. NVD has never re-scored this record under v3. EPSS predicts 69.6% exploitation probability in the next 30 days, which is reflected in EG Risk but does not lift the v2 base. Confidence: LOW.
- High exploitation likelihood — EPSS 70%
- Public exploit code is available (Exploit-DB (verified), epss top5pct, epss high, public exploit)
A fix is available — apply it.
- CVSS v2.0 (legacy)
- 7.5HIGHNVD never assigned a CVSS v3 rating to this CVE
- EG Score
- 7.5(low)
- EG Risk
- 66(Track)EG Risk 66/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity75% × 45%Exploitation70% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 70%
- EPSS %ILE
- 99%
- KEV
- Not listed
Published
May 11, 2012
Last Modified
April 29, 2026
References (34)
- secalert@redhathttp://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- secalert@redhathttp://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- secalert@redhathttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- secalert@redhathttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
- secalert@redhathttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- secalert@redhathttp://marc.info/?l=bugtraq&m=134012830914727&w=2
- secalert@redhathttp://secunia.com/advisories/49014
- secalert@redhathttp://secunia.com/advisories/49085
- secalert@redhathttp://support.apple.com/kb/HT5501
- secalert@redhathttp://www.debian.org/security/2012/dsa-2465
- secalert@redhathttp://www.kb.cert.org/vuls/id/520827
- secalert@redhathttp://www.php.net/ChangeLog-5.php#5.4.3
- secalert@redhathttp://www.php.net/archive/2012.php#id2012-05-08-1
- secalert@redhathttp://www.securitytracker.com/id?1027022
- secalert@redhathttps://bugs.php.net/bug.php?id=61910
Patch Availability(1)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | php5-cgi (5.2.4-2ubuntu5.24) @ hardy | 2026-05-29 | ubuntu |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
Debian:6.0(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| php5 | 5.3.3-7 ... 5.3.3-7+squeeze8 (8 versions) | 5.3.3-7+squeeze9 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
All Vendor Advisories
(1)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
Data Freshness Timeline
(refreshed 3× in last 7d / 8× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-08-26 14:40 UTCEPSS rescore
- 2026-08-23 00:12 UTCEPSS rescore
- 2026-08-21 23:43 UTCEPSS rescore
- 2026-08-19 16:59 UTCEPSS rescore
- 2026-08-16 02:09 UTCEPSS rescore
- 2026-08-15 01:25 UTCEPSS rescore
- 2026-08-07 16:21 UTCEPSS rescore
- 2026-08-06 13:41 UTCEPSS rescore
- 2026-07-28 15:31 UTCEPSS rescore
- 2026-07-26 13:45 UTCEG score recompute▲ 7.50
- 2026-07-25 14:12 UTCEPSS rescore
- 2026-07-23 14:14 UTCEPSS rescore
- 2026-07-23 01:07 UTCEG score recompute▼ 6.50
- 2026-07-23 00:10 UTCEG score recompute▲ 6.50
- 2026-07-22 21:49 UTCEG score recompute
- 2026-07-22 14:04 UTCEPSS rescore
- 2026-07-22 14:04 UTCEPSS rescore
- 2026-07-21 15:21 UTCEPSS rescore
- 2026-07-20 17:03 UTCEPSS rescore
- 2026-07-20 17:03 UTCEPSS rescore
- 2026-07-18 10:00 UTCEPSS rescore
- 2026-07-15 16:54 UTCEPSS rescore
- 2026-07-15 16:54 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-13 06:08 UTCEPSS rescore
Show 57 moreShow fewer
- 2026-07-11 08:22 UTCEPSS rescore
- 2026-07-09 19:05 UTCEPSS rescore
- 2026-07-04 06:27 UTCEPSS rescore
- 2026-07-02 14:01 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-27 03:05 UTCEPSS rescore
- 2026-06-27 03:05 UTCEPSS rescore
- 2026-06-25 13:46 UTCEPSS rescore
- 2026-06-25 13:46 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-21 01:56 UTCEPSS rescore
- 2026-06-21 01:56 UTCEPSS rescore
- 2026-06-18 17:49 UTCEPSS rescore
- 2026-06-18 17:49 UTCEPSS rescore
- 2026-06-17 17:49 UTCEPSS rescore
- 2026-06-17 17:49 UTCEPSS rescore
- 2026-06-16 17:49 UTCEPSS rescore
- 2026-06-16 17:49 UTCEPSS rescore
- 2026-06-15 17:44 UTCEPSS rescore
- 2026-06-13 22:57 UTCEPSS rescore
- 2026-06-12 23:08 UTCEPSS rescore
- 2026-06-11 13:56 UTCEPSS rescore
- 2026-06-10 22:14 UTCEPSS rescore
- 2026-06-10 13:18 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-04 13:09 UTCEPSS rescore
- 2026-06-02 20:10 UTCEPSS rescore
- 2026-06-02 20:10 UTCEPSS rescore
- 2026-06-01 13:49 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-29 04:37 UTCEG score recompute
- 2026-05-29 04:37 UTCVendor advisory
- 2026-05-29 04:37 UTCGHSA enrichment
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-26 07:16 UTCEPSS rescore
- 2026-05-26 07:16 UTCEPSS rescore
- 2026-05-26 07:16 UTCEPSS rescore
- 2026-05-24 16:43 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-18 21:29 UTCEPSS rescore
- 2026-05-18 21:29 UTCEPSS rescore
Publicly available exploits
(4 references)Working exploit code is in the public domain (4 Exploit-DB entries). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- Exploit-DBEDB-29316First seen Oct 31, 2013
Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner
Open source ↗ - Exploit-DBEDB-29290✓ verifiedFirst seen Oct 29, 2013
Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution
Open source ↗ - Exploit-DBEDB-18836✓ verifiedFirst seen May 5, 2012
PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection
Open source ↗ - Exploit-DBEDB-18834✓ verifiedFirst seen May 4, 2012
PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)
Open source ↗
Related CVEs(same vendor + same CWE)
Same vendor
10 shownubuntu
- CVE-2004-0989EG 10.0EPSS p97HIGH
- CVE-2004-0990EG 10.0EPSS p98HIGH
- CVE-2004-1010EG 10.0EPSS p95HIGH
- CVE-2004-0941EG 10.0EPSS p95HIGH
- CVE-2004-0981EG 10.0EPSS p93HIGH
- CVE-2004-0882EG 10.0EPSS p96HIGH
- CVE-2004-0888EG 10.0EPSS p95HIGH
- CVE-2004-1012EG 10.0EPSS p93HIGH
- CVE-2004-1013EG 10.0EPSS p93HIGH
- CVE-2004-1018EG 10.0EPSS p97HIGH
Frequently asked(4)
What is CVE-2012-2311?
When was CVE-2012-2311 disclosed?
Is CVE-2012-2311 actively exploited?
How do I remediate CVE-2012-2311?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2012-2311
Is Your Infrastructure Affected by CVE-2012-2311?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.