CVE-2012-1823

CVE-2012-1823 is a critical-severity vulnerability in Php with a CVSS 3.x base score of 9.8. It is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, confirming it has been exploited in the wild (added 2022-03-25). The underlying weakness is classified as CWE-77.

Key facts

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.

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 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2012-1823 being actively exploited?
Yes. CVE-2012-1823 is on CISA's Known Exploited Vulnerabilities (KEV) catalog, added on 2022-03-25, which means active exploitation has been confirmed. It should be prioritised for remediation.
What products are affected by CVE-2012-1823?
CVE-2012-1823 primarily affects Php. In total, 28 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2012-1823?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Because this CVE is known to be actively exploited, treat remediation as urgent — CISA KEV typically sets a short remediation deadline.
Does CVE-2012-1823 have an EU (EUVD) identifier?
Yes. CVE-2012-1823 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2012-1833. It is also flagged as exploited in the EUVD (since 2022-03-25).
When was CVE-2012-1823 published?
CVE-2012-1823 was published on 2012-05-11 and last updated on 2026-06-16.

References

Affected products (28)

More vulnerabilities in Php

All CVEs affecting Php →

Other CWE-77 (Command Injection) vulnerabilities

Browse all CWE-77 (Command Injection) vulnerabilities →

Threat intelligence

Threat-intel indicators referencing this CVE: