CVE-2012-1823
PHP-CGI Query String Parameter Vulnerability
- Published
- May 11, 2012
- Updated
- Nov 4, 2025
- Assigning CNA
- certcc
- Evidence observed
- May 4, 2012
Primary CVSS
nvd · CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HHigh · next 30 days
- Percentile
- 100.0%
- Model date
- Oct 15, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
CISA Known Exploited
This CVE appears in the CISA Known Exploited Vulnerabilities catalog.
Summary
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.
Sources
http/cves/2012/CVE-2012-1823.yaml
Nuclei TemplatesDeclared conditions
- network: http($.protocol_keys)
- verification: word($.matchers[*].type)
- Vulhub vulnerability labs
Declared conditions
- lab image version: vulhub/php:5.4.1-cgi(php/CVE-2012-1823/docker-compose.yml:services.php.image)
modules/exploits/multi/http/php_cgi_arg_injection.rb
Metasploit Framework modulesDeclared conditions
- platform: PHP($.exploit_multi/http/php_cgi_arg_injection.platform)
- verification: check_declared($.exploit_multi/http/php_cgi_arg_injection.check)
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.