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
Jun 16, 2026
Affected
0 pkgs
Patched
None yet
Exploits
18 known

EPSS Exploitation Probability

via FIRST.org ↗
100.0%probability of exploitation in next 30 days
Very High Risk100th percentile0.00%
92.7%95.1%97.6%100.0%94.4%100.0%Jan 26May 26Jul 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-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

EDB-18836remotephp✓ Verified

PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection

by rayh4c · May 5, 2012

Detection & mitigation playbook

Vendor / appliance
  1. Detect

    Inventory every apple mac os x deployment and check each version against the affected-products list above. Because the exploit targets the running system rather than your application code, also watch for remote code execution at the network and runtime layer — O3 flags the exploit behaviour from runtime telemetry and egress traffic even before a vulnerable build is confirmed.

  2. Fix

    Apply the apple mac os x security patch or hotfix for CVE-2012-1823 on the affected version, following the vendor advisory for your exact build.

  3. Workarounds

    Cut exposure now: restrict the management/admin interface to trusted networks, segment the device, and apply the vendor's recommended configuration mitigations and any WAF/IPS signature. O3's runtime protection blocks the exploit chain at execution, holding the line on unpatched or end-of-life systems until you can patch.

  4. How O3 protects you

    O3 detects and blocks CVE-2012-1823 exploitation at runtime: eBPF exploit-chain detection, plus L7 egress monitoring that catches the post-exploitation callback and severs the attacker's outbound channel.

Tailored to CVE-2012-1823. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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 · Runtime Protection

Is CVE-2012-1823 being exploited in your environment?

O3's eBPF runtime sensors and L7 egress monitoring detect and block the CVE-2012-1823 exploit chain at execution — protecting unpatched and end-of-life systems until the vendor patch is applied.