Skip to content
Server Security Center
KEVcritical9.8

CVE-2012-1823: PHP-CGI Query String Parameter

PHP · listed in the CISA catalog of actively exploited vulnerabilities since 2022-03-25.

CVSS v3.1 (CISA ADP)
9.8
critical
EPSS (exploit probability, 30 days)
>99.9%
among the highest 0.1% of all CVEs
Added to CISA KEV
2022-03-25
US federal due date 2022-04-15
Automatable (CISA SSVC)
yes
technical impact: total

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.

CISA required action: Apply updates per vendor instructions.

CISA notes

How to fix it

  • The CVE record names no fixed version – check CISA's required action for updates and mitigations.
  • CISA's deadline for US federal agencies: 2022-04-15 (passed) – a useful benchmark for everyone else, too.

CISA's assessment (SSVC)

Exploitation
Exploited in the wild
Automatable
Yes – attackers can automate it at scale
Technical impact
Total – full control of the component or total information disclosure

Weakness: CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')

References

Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-21. Always confirm with the vendor's or distribution's advisory before patching.