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.
CVE-2012-1823
Score elevated to 9.8 because this CVE is listed on the CISA Known Exploited Vulnerabilities catalog (added 2022-03-25), indicating real-world exploitation has been confirmed by US federal agencies. NVD baseline CVSS 9.8 retained for reference. Confidence: HIGH.
- Actively exploited in the wild (CISA-KEV)
A fix is available — apply it.
- CVSS v3
- 9.8
- EG Score
- 9.8(high)
- EG Risk
- 99(Act)EG Risk 99/100SSVC: Act
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity98% × 45%Exploitation100% × 40%Automatability100% × 15%Action: Fix now — active exploitation, automatable, high impact. - EPSS PROB
- 100%
- EPSS %ILE
- 100%
- KEV
- ⚠ Exploited
Published
May 11, 2012
Last Modified
April 21, 2026
Advisory Details (4)
Auto-updated Aug 26, 2026'[security bulletin] HPSBUX02791 SSRT100856 rev.1 - HP-UX Apache Web Server running PHP, Remote Execu' - MARC
http://marc.info/?l=bugtraq&m=134012830914727&w=2Patch Availability(5)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | php5-cgi (5.3.10-1ubuntu3.1) @ precise | 2026-08-28 | ubuntu |
| redhat | php-0:5.3.3-3.el6_1.4 | 2012-05-10 | redhat |
| redhat | php53-0:5.3.3-1.el5_6.2 | 2012-05-10 | redhat |
| redhat | php-0:5.3.3-3.el6_2.8 | 2012-05-07 | redhat |
| redhat | php53-0:5.3.3-7.el5_8 | 2012-05-07 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
Debian:6.0(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| php5 | 5.3.3-7 ... 5.3.3-7+squeeze8 (8 versions) | 5.3.3-7+squeeze9 | — |
Weakness Classification(2)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
All Vendor Advisories
(5)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
Data Freshness Timeline
(refreshed 92× in last 7d / 398× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 1,172 total refreshes for this CVE.
- 2026-08-28 04:22 UTCVendor advisory
- 2026-08-28 04:22 UTCGHSA enrichment
- 2026-08-28 00:33 UTCVendor advisory
- 2026-08-28 00:33 UTCGHSA enrichment
- 2026-08-27 20:47 UTCVendor advisory
- 2026-08-27 20:47 UTCGHSA enrichment
- 2026-08-27 17:22 UTCCISA KEV update
- 2026-08-27 17:01 UTCVendor advisory
- 2026-08-27 17:01 UTCGHSA enrichment
- 2026-08-27 13:11 UTCVendor advisory
- 2026-08-27 13:11 UTCGHSA enrichment
- 2026-08-27 09:24 UTCVendor advisory
- 2026-08-27 09:24 UTCGHSA enrichment
- 2026-08-27 05:39 UTCVendor advisory
- 2026-08-27 05:38 UTCGHSA enrichment
- 2026-08-27 01:49 UTCVendor advisory
- 2026-08-27 01:49 UTCGHSA enrichment
- 2026-08-26 22:03 UTCVendor advisory
- 2026-08-26 22:03 UTCGHSA enrichment
- 2026-08-26 18:15 UTCVendor advisory
- 2026-08-26 18:15 UTCGHSA enrichment
- 2026-08-26 17:41 UTCCISA KEV update
- 2026-08-26 14:29 UTCVendor advisory
- 2026-08-26 14:29 UTCGHSA enrichment
- 2026-08-26 10:44 UTCVendor advisory
Show 75 moreShow fewer
- 2026-08-26 10:43 UTCGHSA enrichment
- 2026-08-26 06:57 UTCVendor advisory
- 2026-08-26 06:57 UTCGHSA enrichment
- 2026-08-26 03:11 UTCVendor advisory
- 2026-08-26 03:10 UTCGHSA enrichment
- 2026-08-25 23:22 UTCVendor advisory
- 2026-08-25 23:22 UTCGHSA enrichment
- 2026-08-25 19:36 UTCVendor advisory
- 2026-08-25 19:36 UTCGHSA enrichment
- 2026-08-25 15:49 UTCVendor advisory
- 2026-08-25 15:49 UTCGHSA enrichment
- 2026-08-25 12:03 UTCVendor advisory
- 2026-08-25 12:03 UTCGHSA enrichment
- 2026-08-25 08:17 UTCVendor advisory
- 2026-08-25 08:16 UTCGHSA enrichment
- 2026-08-25 04:26 UTCVendor advisory
- 2026-08-25 04:26 UTCGHSA enrichment
- 2026-08-25 00:40 UTCVendor advisory
- 2026-08-25 00:40 UTCGHSA enrichment
- 2026-08-24 20:54 UTCVendor advisory
- 2026-08-24 20:54 UTCGHSA enrichment
- 2026-08-24 18:52 UTCCISA KEV update
- 2026-08-24 17:07 UTCVendor advisory
- 2026-08-24 17:07 UTCGHSA enrichment
- 2026-08-24 13:22 UTCVendor advisory
- 2026-08-24 13:22 UTCGHSA enrichment
- 2026-08-24 09:36 UTCVendor advisory
- 2026-08-24 09:36 UTCGHSA enrichment
- 2026-08-24 05:50 UTCVendor advisory
- 2026-08-24 05:50 UTCGHSA enrichment
- 2026-08-24 02:03 UTCVendor advisory
- 2026-08-24 02:02 UTCGHSA enrichment
- 2026-08-23 22:15 UTCVendor advisory
- 2026-08-23 22:15 UTCGHSA enrichment
- 2026-08-23 18:29 UTCVendor advisory
- 2026-08-23 18:29 UTCGHSA enrichment
- 2026-08-23 14:43 UTCVendor advisory
- 2026-08-23 14:43 UTCGHSA enrichment
- 2026-08-23 10:57 UTCVendor advisory
- 2026-08-23 10:57 UTCGHSA enrichment
- 2026-08-23 07:11 UTCVendor advisory
- 2026-08-23 07:11 UTCGHSA enrichment
- 2026-08-23 03:26 UTCVendor advisory
- 2026-08-23 03:25 UTCGHSA enrichment
- 2026-08-22 23:40 UTCVendor advisory
- 2026-08-22 23:40 UTCGHSA enrichment
- 2026-08-22 19:54 UTCVendor advisory
- 2026-08-22 19:54 UTCGHSA enrichment
- 2026-08-22 16:08 UTCVendor advisory
- 2026-08-22 16:08 UTCGHSA enrichment
- 2026-08-22 12:22 UTCVendor advisory
- 2026-08-22 12:22 UTCGHSA enrichment
- 2026-08-22 08:36 UTCVendor advisory
- 2026-08-22 08:36 UTCGHSA enrichment
- 2026-08-22 04:50 UTCVendor advisory
- 2026-08-22 04:50 UTCGHSA enrichment
- 2026-08-22 01:04 UTCVendor advisory
- 2026-08-22 01:04 UTCGHSA enrichment
- 2026-08-21 21:18 UTCVendor advisory
- 2026-08-21 21:18 UTCGHSA enrichment
- 2026-08-21 17:32 UTCVendor advisory
- 2026-08-21 17:32 UTCGHSA enrichment
- 2026-08-21 16:49 UTCCISA KEV update
- 2026-08-21 13:46 UTCVendor advisory
- 2026-08-21 13:46 UTCGHSA enrichment
- 2026-08-21 09:58 UTCVendor advisory
- 2026-08-21 09:58 UTCGHSA enrichment
- 2026-08-21 06:12 UTCVendor advisory
- 2026-08-21 06:12 UTCGHSA enrichment
- 2026-08-21 02:26 UTCVendor advisory
- 2026-08-21 02:26 UTCGHSA enrichment
- 2026-08-20 22:39 UTCVendor advisory
- 2026-08-20 22:39 UTCGHSA enrichment
- 2026-08-20 18:53 UTCVendor advisory
- 2026-08-20 18:53 UTCGHSA enrichment
Publicly available exploits
(9 references)Working exploit code is in the public domain (1 Metasploit module) (3 GitHub PoCs) (4 Exploit-DB entries). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoC0xl0k1/CVE-2012-1823First seen Aug 24, 2023
PHP CGI Argument Injection.
Open source ↗ - GitHub PoCUnix13/metasploitable2First seen Jul 5, 2019
PHP-CGI-REMOTE_CVE-2012-1823, UnrealIRCd, MySQL, PostgreSQL and SSH bruteforce, VSFTPD2.3.4, samba CVE-2007-2447, JAVA RMI Server, distcc daemon, misconfigured NFS files, etc.
Open source ↗ - GitHub PoCtardummy01/oscp_scripts-1First seen Oct 1, 2017
First script, pgp-cgi-cve-2012-1823 BASH script
Open source ↗ - Exploit-DBEDB-29316First seen Oct 31, 2013
Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner
Open source ↗ - Exploit-DBEDB-29290✓ verifiedFirst seen Oct 29, 2013
Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution
Open source ↗ - Exploit-DBEDB-18836✓ verifiedFirst seen May 5, 2012
PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection
Open source ↗ - Exploit-DBEDB-18834✓ verifiedFirst seen May 4, 2012
PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)
Open source ↗ - Metasploitexploit/multi/http/php_cgi_arg_injection✓ verifiedFirst seen May 3, 2012
PHP CGI Argument Injection
Open source ↗ - Nucleihttp/cves/2012/CVE-2012-1823.yamlFirst seen Jan 1, 2012
PHP CGI v5.3.12/5.4.2 Remote Code Execution
Open source ↗
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
- CVE-2001-0825EG 10.0HIGH
- CVE-2001-1009EG 10.0EPSS p93HIGH
- CVE-2001-0554EG 10.0EPSS p98HIGH
- CVE-2001-1162EG 10.0EPSS p96HIGH
- CVE-2001-0414EG 10.0EPSS p100HIGH
- CVE-2001-0191EG 10.0EPSS p92HIGH
- CVE-2001-0301EG 10.0EPSS p91HIGH
- CVE-2001-0197EG 10.0EPSS p96HIGH
- CVE-2001-0233EG 10.0EPSS p96HIGH
- CVE-2001-0010EG 10.0EPSS p98HIGH
Same CWE
10 shownCWE-20
- CVE-2005-0050EG 10.0EPSS p99HIGH
- CVE-2004-1019EG 10.0EPSS p94HIGH
- CVE-2004-0840EG 10.0EPSS p98HIGH
- CVE-2003-1425EG 10.0EPSS p96HIGH
- CVE-2003-1487EG 10.0EPSS p94HIGH
- CVE-2002-1874EG 10.0HIGH
- CVE-2002-2236EG 10.0EPSS p91HIGH
- CVE-2002-2365EG 10.0HIGH
- CVE-2002-1358EG 10.0EPSS p93HIGH
- CVE-2002-1359EG 10.0EPSS p100HIGH
Frequently asked(6)
What is CVE-2012-1823?
When was CVE-2012-1823 disclosed?
Is CVE-2012-1823 actively exploited?
What is the CVSS score of CVE-2012-1823?
Which products are affected by CVE-2012-1823?
How do I remediate CVE-2012-1823?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2012-1823
Is Your Infrastructure Affected by CVE-2012-1823?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.