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…
Noroxi assessment
Priority: Now (action score 99/100)
- CISA has confirmed exploitation in the wild (Mar 25, 2022). Remediation deadline for US federal agencies: Apr 15, 2022.
- A ready-made attack module is public (Metasploit, Nuclei); exploiting it takes no special expertise.
- Probability of exploitation in the next 30 days: 99.9% (FIRST EPSS); higher than 99.9% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- According to CISA the attack is automatable: targets can be found by mass scanning.
- Fixed version: php5 (Debian:6.0) 5.3.3-7+squeeze9; php (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-34.el5_8; php-bcmath (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-34.el5_8.
Patch today or shut off access. Upgrade to php5 (Debian:6.0) 5.3.3-7+squeeze9; php (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-34.el5_8; php-bcmath (Red Hat:enterprise_linux:5::client_workstation) 0:5.1.6-34.el5_8 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · CISA KEV · FIRST EPSS
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.
- Published
- May 11, 2012
- Updated
- Jun 16, 2026
- EPSS
- 99.9% · 99th percentile
- CWE
- CWE-77
Report tools
Action score
99
Patch today or shut off access.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 30 / 30 · Listed
- EPSS
- 30 / 30 · 99.9%
CISA SSVC decision
- Exploitation
- active
- Automatable
- yes
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
Actively exploited in the wild
CISA added this to its Known Exploited Vulnerabilities catalog on Mar 25, 2022. That signals real attacks, not theory.
Remediation deadline for US federal agencies: Apr 15, 2022.
Get told when this record changes
- In CISA KEV: exploitation in the wild confirmed
- Weaponized exploit exists
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| php | php | cpe:2.3:a:php:php |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| hp | hp-ux | cpe:2.3:o:hp:hp-ux |
| opensuse | opensuse | cpe:2.3:o:opensuse:opensuse |
| suse | linux enterprise server | cpe:2.3:o:suse:linux_enterprise_server |
| suse | linux enterprise software development kit | cpe:2.3:o:suse:linux_enterprise_software_development_kit |
| apple | mac os x | cpe:2.3:o:apple:mac_os_x |
| redhat | application stack | cpe:2.3:a:redhat:application_stack |
| redhat | gluster storage server for on-premise | cpe:2.3:a:redhat:gluster_storage_server_for_on-premise |
| redhat | storage | cpe:2.3:a:redhat:storage |
| redhat | storage for public cloud | cpe:2.3:a:redhat:storage_for_public_cloud |
and 5 more
Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php phpbefore 5.3.12
- php php5.4.0 and later · before 5.4.2
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:6.0 | php5 | before 5.3.3-7+squeeze9 | 5.3.3-7+squeeze9 |
| Red Hat:enterprise_linux:5::client_workstation | php | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-bcmath | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-cli | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-common | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-dba | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-debuginfo | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-devel | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-gd | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-imap | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-ldap | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-mbstring | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-mysql | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-ncurses | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-odbc | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-pdo | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-pgsql | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-snmp | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-soap | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-xml | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php-xmlrpc | before 0:5.1.6-34.el5_8 | 0:5.1.6-34.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php53 | before 0:5.3.3-7.el5_8 | 0:5.3.3-7.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php53-bcmath | before 0:5.3.3-7.el5_8 | 0:5.3.3-7.el5_8 |
| Red Hat:enterprise_linux:5::client_workstation | php53-cli | before 0:5.3.3-7.el5_8 | 0:5.3.3-7.el5_8 |
+96
Same product
php: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-4577Argument Injection in PHP-CGIKEV99Now
- CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV99Now
- CVE-2026-109619RCE via stale global stateKEV96Now
Published before and after this one in the same product
- ← EarlierCVE-2012-0788Feb 14, 2012 · The PDORow implementation in PHP before 5.3.9 does not properly interact with the session feature, which allows remote attackers to cause a…23Monitor
- ← EarlierCVE-2012-0789Feb 14, 2012 · Memory leak in the timezone functionality in PHP before 5.3.9 allows remote attackers to cause a denial of service (memory consumption) by…22Monitor
- Later →CVE-2012-2311May 11, 2012 · sapi/cgi/cgi_main.c in PHP before 5.3.13 and 5.4.x before 5.4.3, when configured as a CGI script (aka php-cgi), does not properly handle…51Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:php5 | 5.3.3-7+squeeze9 · Debian:6.0 | Package registry (OSV) |
| red hat:php | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-bcmath | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-cli | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-common | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-dba | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-debuginfo | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-devel | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-gd | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-imap | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-ldap | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-mbstring | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
| red hat:php-mysql | 0:5.1.6-34.el5_8 · Red Hat:enterprise_linux:5::client_workstation | Package registry (OSV) |
Exploit status
Weaponized
A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.
Evidence
- Metasploit module ×1
- Exploit-DB entry ×4
- Nuclei detection template ×1
- Proof-of-concept repository on GitHub ×16
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Proof-of-concept repository on GitHub | 16 repositories | 2015-09-08 → 2026-10-08 |
| Exploit-DB entry | remote | 2013-10-29 |
| Exploit-DB entry | remote | 2013-10-31 |
| Exploit-DB entry | remote | 2012-05-04 |
| Exploit-DB entry | remote | 2012-05-05 |
| Metasploit module | exploit/multi/http/php_cgi_arg_injectionPHP CGI Argument Injectionexploit | 2012-05-03 |
| Nuclei detection template | Nuclei template CVE-2012-1823 | — |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Metasploit-8 d
- First PoC-7 d
- Published
- CISA KEV+3605 d
- TodayNov 15, 2026+5301 d
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- LDAP InjectionCAPEC-136likelihood: High · High
- Command DelimitersCAPEC-15likelihood: High · High
- IMAP/SMTP Command InjectionCAPEC-183Medium
- Command InjectionCAPEC-248likelihood: Medium · High
- Manipulating Writeable Terminal DevicesCAPEC-40likelihood: High · Very High
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Manipulating Writeable Configuration FilesCAPEC-75likelihood: High · Very High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (19 more)Show less
- lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- marc.info/?l=bugtraq&m=134012830914727&w=2
- rhn.redhat.com/errata/RHSA-2012-0546.html
- rhn.redhat.com/errata/RHSA-2012-0547.html
- rhn.redhat.com/errata/RHSA-2012-0568.html
- rhn.redhat.com/errata/RHSA-2012-0569.html
- rhn.redhat.com/errata/RHSA-2012-0570.html
- secunia.com/advisories/49014
- secunia.com/advisories/49065
- secunia.com/advisories/49085
- secunia.com/advisories/49087
- support.apple.com/kb/HT5501
- www.debian.org/security/2012/dsa-2465
- www.kb.cert.org/vuls/id/673343
- www.mandriva.com/security/advisories?name=MDVSA-2012:068
- www.openwall.com/lists/oss-security/2024/06/07/1
Vendor advisories and official records. Exploit/PoC links are deliberately left out.