CVE-2012-1823
CRITICALCISA KEVEPSS 100th pctlDescription
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 to fix
TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works
Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.
CVSS v3 Vector
Exploitability
Impact
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Exploit Intelligence
Very high risk: more likely to be exploited than 100% of all known CVEs.
PHP-CGI Query String Parameter Vulnerability
sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.
Apply updates per vendor instructions.
Remediation due: 2022-04-15
References
Related Vulnerabilities
Other CWE-77 (Command Injection) vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2024-3400 | Critical | 10.0 | 100% | KEV + Ransom | - |
| CVE-2024-21887 | Critical | 9.1 | 100% | KEV + Ransom | - |
| CVE-2023-1671 | Critical | 9.8 | 100% | KEV | Fix |
| CVE-2023-1389 | High | 8.8 | 100% | KEV | Fix |
| CVE-2021-1498 | Critical | 9.8 | 100% | KEV | Fix |
| CVE-2024-3273 | High | 7.3 | 100% | KEV | - |
Common questions
How do I fix CVE-2012-1823?
Published advisories record a fix for 2 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.
Is CVE-2012-1823 being actively exploited?
Yes. CVE-2012-1823 is listed in the CISA Known Exploited Vulnerabilities catalog, which means exploitation has been observed in the wild. US federal agencies were required to remediate it by 2022-04-15. Treat it as a priority whatever its CVSS score says.
How severe is CVE-2012-1823?
CVE-2012-1823 has a CVSS v3 base score of 9.8, rated critical. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.
What does CVE-2012-1823 affect?
Published advisories record a fix for mac os x (NVD), php (NVD). Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.
Embed a live status badge for CVE-2012-1823
Markdown
[](https://tridentstack.com/cve/CVE-2012-1823)HTML
<a href="https://tridentstack.com/cve/CVE-2012-1823"><img src="https://tridentstack.com/cve/badge/CVE-2012-1823.svg" alt="CVE-2012-1823"></a>Find and fix vulnerabilities across your fleet
TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.
This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-04-21.