CVE-2012-2336: 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…
Noroxi assessment
Priority: Monitor (action score 36/100)
- Public proof-of-concept code exists (Exploit-DB); there is no record of exploitation in the wild.
- Probability of exploitation in the next 30 days: 52% (FIRST EPSS); higher than 98.9% of all records.
- No special conditions are required; it is repeatable.
- Fixed version: php (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-39.el5_8; php-bcmath (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-39.el5_8; php-cli (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-39.el5_8.
Low priority for now. Upgrade to php (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-39.el5_8; php-bcmath (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-39.el5_8; php-cli (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-39.el5_8 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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 lack an = (equals sign) character, which allows remote attackers to cause a denial of service (resource consumption) by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'T' case. NOTE: this vulnerability exists because of an incomplete fix for CVE-2012-1823.
- Published
- May 11, 2012
- Updated
- Jun 16, 2026
- EPSS
- 52.0% · 98th percentile
- CWE
- CWE-20
Report tools
Action score
36
Low priority for now.
- CVSS
- 20 / 40 · 5.0 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 16 / 30 · 52.0%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Proof of concept exists, no weaponized module
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| php | php | cpe:2.3:a:php:php |
Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php phpup to 5.3.12 inclusive
- php php1.0
- php php2.0
- php php2.0b10
- php php3.0
- php php3.0.1
- php php3.0.10
- php php3.0.11
+12 more rows
- php php3.0.12
- php php3.0.13
- php php3.0.14
- php php3.0.15
- php php3.0.16
- php php3.0.17
- php php3.0.18
- php php3.0.2
- php php3.0.3
- php php3.0.4
- php php3.0.5
- php php3.0.6
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Red Hat:enterprise_linux:5::client_workstation | php | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-bcmath | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-cli | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-common | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-dba | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-debuginfo | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-devel | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-gd | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-imap | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-ldap | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-mbstring | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-mysql | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-ncurses | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-odbc | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-pdo | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-pgsql | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-snmp | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-soap | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-xml | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-xmlrpc | before 0:5.1.6-39.el5_8 | 0:5.1.6-39.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php53 | before 0:5.3.3-13.el5_8 | 0:5.3.3-13.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php53-bcmath | before 0:5.3.3-13.el5_8 | 0:5.3.3-13.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php53-cli | before 0:5.3.3-13.el5_8 | 0:5.3.3-13.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php53-common | before 0:5.3.3-13.el5_8 | 0:5.3.3-13.el5_8 |
+45
Same product
php: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-4577Argument Injection in PHP-CGIKEV99Now
- CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV99Now
- CVE-2012-1823sapi/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…KEV99Now
Published before and after this one in the same product
- ← EarlierCVE-2012-2329May 11, 2012 · Buffer overflow in the apache_request_headers function in sapi/cgi/cgi_main.c in PHP 5.4.x before 5.4.3 allows remote attackers to cause a…40Plan
- ← EarlierCVE-2012-2335May 11, 2012 · php-wrapper.fcgi does not properly handle command-line arguments, which allows remote attackers to bypass a protection mechanism in PHP 5.3.40Plan
- Later →CVE-2012-2376May 21, 2012 · Buffer overflow in the com_print_typeinfo function in PHP 5.4.3 and earlier on Windows allows remote attackers to execute arbitrary code…46Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| red hat:php | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-bcmath | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-cli | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-common | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-dba | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-debuginfo | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-devel | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-gd | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-imap | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-ldap | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-mbstring | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-mysql | 0:5.1.6-39.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Exploit-DB entry ×4
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | remote | 2013-10-29 |
| Exploit-DB entry | remote | 2013-10-31 |
| Exploit-DB entry | remote | 2012-05-04 |
| Exploit-DB entry | remote | 2012-05-05 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- First PoC-7 d
- Published
- TodayNov 15, 2026+5301 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Not on record for this CVE: patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- P · the service can be disrupted
- Attack complexity
- Low
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- P
Weakness class (CWE)
CWE-20 · Improper Input ValidationCVSS vector
AV:N/AC:L/Au:N/C:N/I:N/A:P
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Buffer Overflow via Environment VariablesCAPEC-10likelihood: High · High
- Server Side Include (SSI) InjectionCAPEC-101likelihood: High · High
- Cross Zone ScriptingCAPEC-104likelihood: Medium · High
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Object Relational Mapping InjectionCAPEC-109likelihood: Low · High
- SQL Injection through SOAP Parameter TamperingCAPEC-110likelihood: High · Very High
- Double EncodingCAPEC-120likelihood: Low · Medium
- Subverting Environment Variable ValuesCAPEC-13likelihood: High · Very High
ATT&CK techniques
- Obfuscated Files or InformationT1027
- Masquerading: Invalid Code SignatureT1036.001
- Steal Web Session CookieT1539
- Subvert Trust Controls: Code SigningT1553.002
- Impair Defenses:Impair Command History LoggingT1562.003
- Hijack Execution Flow:Dynamic Linker HijackingT1574.006
- Hijack Execution Flow:Path Interception by PATH Environment VariableT1574.007
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- lists.opensuse.org/opensuse-security-announce/2012-07/msg00003.html
- secunia.com/advisories/49014
- www.php.net/ChangeLog-5.php#5.4.3
- www.php.net/archive/2012.php#id2012-05-08-1
- bugs.php.net/bug.php?id=61910
- bugs.php.net/patch-display.php?bug_id=61910&patch=CVE-2012-1823.patch&revision=1336251592&display=1
- h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
Vendor advisories and official records. Exploit/PoC links are deliberately left out.