Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
CISA KEV·Added 2022-03-25 — agencies required to remediate by 2022-04-15

CVE-2012-1823

CRITICAL

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,…

Published
May 11, 2012
Updated
Apr 21, 2026
Affected
0 pkgs
Patched
None yet
Exploits
18 known

EPSS Exploitation Probability

via FIRST.org ↗
94.4%probability of exploitation in next 30 days
Very High Risk100th percentile0.00%
93.9%94.2%94.5%94.9%94.4%94.4%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

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.

Affected Products

17 products · 30 configurations
OS
mac os xapple
≥ 10.8.0 && < 10.8.2
range
OS
debian linuxdebian
1 version
6.0
OS
fedorafedoraproject
2 versions
3940
OS
hp-uxhp
2 versions
b.11.23b.11.31
OS
opensuseopensuse
2 versions
11.412.1
Application
phpphp
≥ 5.4.0 && < 5.4.2
range
Exploits & PoCs
18

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

EDB-29290remotephp✓ Verified

Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution

by kingcope · Oct 29, 2013

EDB-18836remotephp✓ Verified

PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection

by rayh4c · May 5, 2012

EDB-29316remotephp

Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner

by noptrix · Oct 31, 2013

EDB-18834remotephp✓ Verified

PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)

by Metasploit · May 4, 2012

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2012-1823 in your stack?

O3 detects CVE-2012-1823 across dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.