SARA / Free Tools / CVE / CVE-2012-1823

CVE-2012-1823 — PHP-CGI Query String Parameter Vulnerability

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 i

CVSS
EPSS
94.39% (top 0.00%)
CWE
Published
2012-05-11T10:00:00.000Z
Last modified
2025-11-04T17:11:54.860Z
CVSS vector
CISA KEV — Actively Exploited
Added to KEV
2022-03-25
BOD 22-01 due
2022-04-15
Ransomware use
Unknown

01What is this vulnerability?

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.

02Affected products

VendorProductVersions
na / n/an/a

03Active exploitation status

Yes — actively exploited. Added to the CISA KEV catalog on 2022-03-25. Ransomware use: Unknown.

04Recommended remediation

05Technical details

For the full vendor write-up, exploit chains, and reference implementations, see the references list in section 09.

06Detection signatures

Open the Sigma generator with a pre-filled prompt for this CVE to draft a starting detection in your stack of choice:

Open in Sigma generator →

07Related CVEs

No directly-cited follow-up CVEs in the KB record for this advisory. The references list in section 09 carries the vendor cross-references.

08Timeline

09References

Want this in your SOAR or SIEM?
SARA's API returns EPSS, CVSS, KEV, and an analyst-grade summary in one call.
Read the API reference →