Skip to content
ImpactrStart an engagement
CVE-2012-1823 CISA KEV — actively exploited

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.

CVSS scoreCritical

9.8

EPSS — exploitation probabilityCritical

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 found

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.

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.