Home / Php / Php / CVE-2012-1823
CVE-2012-1823: is it exploited, and which versions of Php are affected and fixed?
CVE-2012-1823 is a command injection vulnerability in Php, and it is exploited in the wild: CISA added it to its Known Exploited Vulnerabilities catalog on March 25, 2022, with a federal due date of April 15, 2022. Affected: php before 5.3.12, php from 5.4.0 before 5.4.2, fedora 39 and 26 more (NVD). Fixed in 5.3.12, 5.4.2, 10.7.5 and 10.8.2 (NVD). Severity: Critical (9.8, CVSS 3.1, from CISA-ADP).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 06:38 UTC, CVE record November 19, 2026, 07:20 UTC and NVD November 19, 2026, 08:49 UTC.
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.
From the CVE record by certcc, last updated November 4, 2025, 17:11 UTC.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| php | php | before 5.3.12 | application |
| php | php | from 5.4.0 before 5.4.2 | application |
| fedoraproject | fedora | 39 | operating system |
| fedoraproject | fedora | 40 | operating system |
| debian | debian linux | 6.0 | operating system |
| hp | hp-ux | b.11.23 | operating system |
| hp | hp-ux | b.11.31 | operating system |
| opensuse | opensuse | 11.4 | operating system |
| opensuse | opensuse | 12.1 | operating system |
| suse | linux enterprise server | 10 | operating system |
| suse | linux enterprise server | 11 | operating system |
| suse | linux enterprise software development kit | 10 | operating system |
| suse | linux enterprise software development kit | 11 | operating system |
| apple | mac os x | from 10.6.8 before 10.7.5 | operating system |
| apple | mac os x | from 10.8.0 before 10.8.2 | operating system |
| redhat | application stack | 2.0 | application |
| redhat | gluster storage server for on-premise | 2.0 | application |
| redhat | storage | 2.0 | application |
| redhat | storage for public cloud | 2.0 | application |
| redhat | enterprise linux desktop | 6.0 | operating system |
| redhat | enterprise linux eus | 5.6 | operating system |
| redhat | enterprise linux eus | 6.1 | operating system |
| redhat | enterprise linux eus | 6.2 | operating system |
| redhat | enterprise linux server | 5.0 | operating system |
| redhat | enterprise linux server | 6.0 | operating system |
NVD analysis (status Analyzed), last modified June 16, 2026, 23:40 UTC.
How severe is CVE-2012-1823?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.8 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | CISA-ADP |
| High 7.5 | CVSS 2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2012-1823 exploited in the wild?
- CISA KEV
- Listed as PHP-CGI Query String Parameter Vulnerability, added March 25, 2022; federal agencies must act by April 15, 2022
- Required action
- Apply updates per vendor instructions.
- Ransomware use
- Unknown
- CISA's summary
- 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.
- CISA SSVC
- Exploitation: active; automatable: yes; technical impact: total (CISA ADP, February 7, 2025)
- EPSS
- 100.0% probability of exploitation activity in the next 30 days, percentile 100.0 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-77 Improper Neutralization of Special Elements used in a Command
Where are the vendor advisories and references?
- SSRT100856 vendor-advisory
- SUSE-SU-2012:0604 vendor-advisory
- 1027022 vdb-entry
- HPSBMU02786 vendor-advisory
- MDVSA-2012:068 vendor-advisory
- openSUSE-SU-2012:0590 vendor-advisory
- RHSA-2012:0546 vendor-advisory
- RHSA-2012:0568 vendor-advisory
- RHSA-2012:0569 vendor-advisory
- http://www.php.net/ChangeLog-5.php#5.4.2
- 49014 third-party-advisory
- RHSA-2012:0570 vendor-advisory
- SUSE-SU-2012:0598 vendor-advisory
- https://bugs.php.net/bug.php?id=61910
- VU#673343 third-party-advisory
- RHSA-2012:0547 vendor-advisory
- APPLE-SA-2012-09-19-2 vendor-advisory
- http://support.apple.com/kb/HT5501
- http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- 49065 third-party-advisory
- VU#520827 third-party-advisory
- https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1
- DSA-2465 vendor-advisory
- 49085 third-party-advisory
- http://www.php.net/archive/2012.php#id2012-05-03-1
- 49087 third-party-advisory
- [oss-security] 20240606 PHP security releases 8.3.8, 8.2.20, and 8.1.29 mailing-list
- FEDORA-2024-49aba7b305 vendor-advisory
- FEDORA-2024-52c23ef1ec vendor-advisory
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2012-1823 government-resource
When was it published, and where is the official record?
- Reserved
- March 21, 2012
- Published
- May 11, 2012, 10:00 UTC
- CVE record updated
- November 4, 2025, 17:11 UTC by certcc
- NVD
- Analyzed, last modified June 16, 2026, 23:40 UTC
- Last checked
- CVE list November 19, 2026, 07:20 UTC; NVD November 19, 2026, 08:49 UTC; KEV December 3, 2026, 06:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD · CISA KEV
What other CVEs affect Php?
- Oct 28, 2019CVE-2019-11043 PHP: buffer overflow exploited
- Jul 3, 2026CVE-2026-14355 php: heap buffer overflow
- Nov 2, 2023CVE-2022-4900 php: memory corruption (buffer overflow)
- Oct 21, 2022CVE-2022-37454 Extended Keccak Code Package Project Extended Keccak Code Package: integer overflow
- Feb 19, 2020CVE-2014-3622 PHP: use after free
- Jan 14, 2020CVE-2015-2326 Pcre: out-of-bounds read
- Jan 14, 2020CVE-2015-2325 Pcre: out-of-bounds read
- Nov 25, 2019CVE-2019-19246 Oniguruma Project Oniguruma: out-of-bounds read
Questions about CVE-2012-1823
Is CVE-2012-1823 exploited in the wild?
Yes. CISA added CVE-2012-1823 to its Known Exploited Vulnerabilities catalog on March 25, 2022 and set federal agencies a due date of April 15, 2022. FIRST's EPSS gives it a 100.0% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Php are affected by CVE-2012-1823?
php before 5.3.12, php from 5.4.0 before 5.4.2, fedora 39, fedora 40, debian linux 6.0, hp-ux b.11.23 and 23 more, per the NVD. The tables above give every range the sources list.
Which version fixes CVE-2012-1823?
5.3.12, 5.4.2, 10.7.5 and 10.8.2, per the NVD. Check the vendor's advisory before you rely on it.
How severe is CVE-2012-1823?
Critical (9.8, CVSS 3.1, from CISA-ADP). The severity table above shows each score with its source.
Where is the official record of CVE-2012-1823?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov; CISA's entry is in its Known Exploited Vulnerabilities catalog. For a fix, the vendor's own advisory is the one to follow.