Servers and applications
CVE-2012-1823
sapi/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 query strings that lack an = (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.
Actively exploited: CISA added it to its Known Exploited Vulnerabilities catalog on 25 Mar 2022.
- Severity
- Critical 9.8
- Published
- 11 May 2012
- Last changed
- 16 Jun 2026
- Added to UpHeron
- 14 Oct 2026
- Fixed in
- 5.3.12, 5.4.2
- Exploit chance
- 100% in the next 30 daysHigher than 99% of CVEs. EPSS by FIRST, 12 Nov 2026
- Weakness
- Command injection (CWE-77)
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Read data · Change data · Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Sources
- NVD
Affected software
| Software | Affected versions |
|---|---|
PHPServers and applications · cpe:a:php:php |
|
Known exploited
- CISA name
- PHP-CGI Query String Parameter Vulnerability
- Required action
- Apply updates per vendor instructions.
- Due for US agencies
- 15 Apr 2022
- Used in ransomware
- Not known