CVE-2012-1823: PHP-CGI Query String Parameter Vulnerability
Vulnerability summary
CVE-2012-1823 is a critical (CVSS 9.8) vulnerability in PHP. It is known to be exploited: CISA lists it, first on 25-03-2022. EPSS estimates a 100.00% chance of exploitation in the next 30 days, higher than 99.9% of scored vulnerabilities. 9 public exploits are recorded.
Listed as exploited by CISA (25-03-2022)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4 · Related 3Timeline
- 11-05-2012PublishedVulnerability first disclosed.
- 25-03-2022Added to CISA KEVExploitedPHP-CGI Query String Parameter Vulnerability
- 15-04-2022CISA remediation dueDeadline passedApply updates per vendor instructions.
- 04-11-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
3 scores · 2 sources · 2 versions- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
100.00%
Chance of exploitation in the next 30 days
Percentile
100%
Versus all other CVEs
30-day change
No change 0.00 pp
From 100.00% on 04-10-2026
Known exploited
Compare KEV catalogs- Added
- 25-03-2022
- Federal due date
- 15-04-2022
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
CISA required action
Apply updates per vendor instructions. nvd.nist.gov/vuln/detail/CVE-2012-1823
Public exploits
9 foundExploit Reference (php.net)
Maturity: unknown
Exploit Reference (bugs.php.net)
Maturity: unknown
Exploit Reference (eindbazen.net)
Maturity: unknown
Show all 9 exploits
Exploit Reference (kb.cert.org)
Maturity: unknown
Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution
Maturity: weaponized
Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner
Maturity: poc
PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)
Maturity: weaponized
PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection
Maturity: weaponized
PHP CGI Argument Injection
exploit/multi/http/php_cgi_arg_injection
Maturity: weaponized
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat59 products
- application_stack2.0
- enterprise_linux_desktop6.0
- enterprise_linux_eus5.6 | 6.1 | 6.2
- enterprise_linux_server5.0 | 6.0
- enterprise_linux_server_aus5.3 | 5.6
Suse2 products
- linux_enterprise_server10:sp4 | 11:sp2
- linux_enterprise_software_development_kit10:sp4 | 11:sp2
Apple1 product
- mac_os_x≥ 10.6.8, < 10.7.5 | ≥ 10.8.0, < 10.8.2
Debian1 product
- debian_linuxEOL6.0
Fedoraproject1 product
- fedoraEOL39 | 40
Hp1 product
- hp-uxb.11.23 | b.11.31
Opensuse1 product
- opensuseEOL11.4 | 12.1
Php1 product
- php< 5.3.12 | ≥ 5.4.0, < 5.4.2
8 vendors · 67 products
References
47 links- lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.htmlVendor AdvisoryMailing ListThird Party Advisory
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.htmlVendor AdvisoryMailing ListThird Party Advisory
Show all 47 references
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.htmlVendor AdvisoryMailing ListThird Party Advisory
- lists.apple.com/archives/security-announce/2012/Sep/msg00004.htmlVendor AdvisoryMailing ListThird Party Advisory
- support.apple.com/kb/HT5501Third Party Advisory
- www.php.net/archive/2012.phpRelease Notes
- www.openwall.com/lists/oss-security/2024/06/07/1Mailing List
- www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2012-1823Government ResourceUS Government Resource