PHP-CGI Query String Parameter Vulnerability
n/a — n/a
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.
9.8
100.0%
Vector breakdown
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- May 11, 2012
- Modified
- Jun 16, 2026
- Added to KEV
- Mar 25, 2022
- Federal patch due
- Apr 15, 2022
CISA required action
Apply updates per vendor instructions.
Weakness classification
Affected packages
Proof-of-concept & exploitation references
8 foundWeaponization
Public repositories whose name or description references CVE-2012-1823, found via a live GitHub search at request time. These are community-sourced signals, not a verified working exploit - cross-check each one before relying on it, and treat higher star counts and recent activity as (weak) corroboration, not proof.
- 0xl0k1/CVE-2012-1823★ 12
PHP CGI Argument Injection.
updated Jul 6, 2026
- Unix13/metasploitable2★ 4
PHP-CGI-REMOTE_CVE-2012-1823, UnrealIRCd, MySQL, PostgreSQL and SSH bruteforce, VSFTPD2.3.4, samba CVE-2007-2447, JAVA RMI Server, distcc daemon, misconfigured NFS files, etc.
updated Feb 4, 2026
- tardummy01/oscp_scripts-1★ 3
First script, pgp-cgi-cve-2012-1823 BASH script
updated Jun 20, 2023
- drone789/CVE-2012-1823★ 1
updated Jan 3, 2025
- cyberharsh/PHP_CVE-2012-1823★ 1
updated Jul 12, 2025
- Dmitri131313/CVE-2012-1823-exploit-for-https-user-password-web★ 1
CVE-2012-1823 exploit for https user password website.
updated Mar 20, 2025
- hackherMind-Pixel/Vulnerable-Lab-Exploitation★ 1
A hands-on project demonstrating the setup of virtual security lab, network reconnaissance, and exploitation of CVE-2012-1823.
updated Feb 13, 2026
- K3ysTr0K3R/CVE-2012-1823★ 0
CVE-2012-1823 - PHP CGI Argument Injection Remote Code Execution (RCE)
updated Jun 30, 2026
References
Frequently asked questions
What is 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.
How severe is CVE-2012-1823?
CVE-2012-1823 has a CVSS base score of 9.8 out of 10 (CVSS 3.1).
Is CVE-2012-1823 actively exploited in the wild?
Yes. CVE-2012-1823 is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added Mar 25, 2022, meaning CISA has confirmed evidence of active exploitation.
What is the EPSS score for CVE-2012-1823?
100.0% - meaning FIRST.org's EPSS model estimates a 100.0% probability this vulnerability will be exploited in the wild within 30 days (100% percentile among all scored CVEs).
Is there exploit tooling available for CVE-2012-1823?
Yes - a public Nuclei template referencing CVE-2012-1823 exist in public repositories we checked. We also found 8 public GitHub repositories referencing this CVE.
What type of vulnerability is CVE-2012-1823?
CVE-2012-1823 is classified under CWE-77 (CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')).
Cross-checked against
Impactr finds and proves whether CVE-2012-1823 - or flaws like it - are actually reachable in your own web apps and APIs, with a reproducible exploit as evidence.
Join the waitlist