Servers and applications
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 (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:…
- Severity
- High 7.5
- Published
- 11 May 2012
- Last changed
- 16 Jun 2026
- Added to UpHeron
- 14 Oct 2026
- Exploit chance
- 69% in the next 30 daysHigher than 99% of CVEs. EPSS by FIRST, 12 Nov 2026
- Weakness
- SQL injection (CWE-89)
- Attack
- Over the network · No login needed
- Attacker can
- Read some data · Change some data · Slow it down
- CVSS vector
AV:N/AC:L/Au:N/C:P/I:P/A:P- Sources
- NVD
Description
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.
Affected software
| Software | Affected versions |
|---|---|
PHPServers and applications · cpe:a:php:php |
All 118 release lines
|