Skip to main content
CVE Radar
CISA KEVhighRemote Code Execpublic exploit

CVE-2012-1823

CVE-2012-1823 — PHP-CGI Query String Parameter Vulnerability

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 Updated Sources: NVD, PHP (CNA), CISA, FIRST EPSS, GitHub, GitHub Security Advisory, Exploit-DB, Red Hat (VEX), SOCRadar CTI

Triage

Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.

Exploitation

Confirmed

CISA KEV, listed Mar 25, 2022

EPSS

100%

top of FIRST's scoreset

Affects

PHP

PHP

CVSS base

7.5

high · 3 sources

CISA SSVC assessment

Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.

CISA

Exploitation

Active

none · proof-of-concept · active

Automatable

Yes

can an attacker script all four kill-chain steps

Technical impact

Total

partial · total control of the vulnerable component

Remediation

The vendor's own words where we have them.

Upgrade PHP to a fixed release. Apply vendor patches per advisory and restrict external exposure of the affected component until patched.

CISA required action

Apply updates per vendor instructions.

Federal deadline Apr 15, 2022 — passed 1,694 days ago

Red Hat VEX · CVE-2012-1823

fixed1056affected0not affected1

vendor_fix: Before applying this update, make sure all previously-released errata relevant to your system have been applied. This update is available via the Red Hat Network. Details on how t…

vendor_fix: Before applying this update, make sure all previously-released errata relevant to your system have been applied. This update is available via the Red Hat Network. Details on how t…

vendor_fix: Before applying this update, make sure all previously-released errata relevant to your system have been applied. This update is available via the Red Hat Network. Details on how t…

First 24 hours

Ordered from the record's own fields — exposure first, because you cannot patch what you have not found.

  • Identify exposed assets running affected vendor/product/version combinations.
  • Treat as emergency remediation because CISA KEV status is present.
  • Search available logs for exploit probes, errors, authentication anomalies, or suspicious child processes matching the vulnerability class.

Affected scope

Vendor, product and version as the advisories word them.

Affected vendors, products and versions
VendorProductVersionsStatus
PHPPHPn/aVulnerable

Attack characteristics

The CVSS vector, decoded. It describes the attack, not your exposure to it.

Availability

P

Confidentiality

P

Integrity

P

Attack Complexity

Low

Attack Vector

Network

Every base score collected

Sources score independently and disagree; each row says who scored it and under which version.

Every CVSS base score collected, by source and version
ScoreVersionSeverityExpl.ImpactSource
9.8CVSS 3.1critical3.95.9CNA, GHSA
7.5CVSS 2.0high106.4NVD
6.8CVSS 3.1mediumn/an/aRed Hat (VEX)

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What this weakness leads to

MITRE's own consequences and mitigations for the weakness class — the authority's wording, not guidance derived from the CVSS vector.

MITRE

CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')

  • Execute Unauthorized Code or Commands

Mitigation: If at all possible, use library calls rather than external processes to recreate the desired functionality.

CWE-20 · Improper Input Validation

  • DoS: Crash, Exit, or Restart
  • DoS: Resource Consumption (CPU)
  • DoS: Resource Consumption (Memory)
  • Read Memory

Mitigation: Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build recognizers for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses. [REF-1109] [REF-1110] [REF-1111]

Weakness & attack patterns

  • CWE-77Command Injection
  • CWE-20Improper Input Validation

Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.

CAPEC-40 · Manipulating Writeable Terminal DevicesCAPEC-75 · Manipulating Writeable Configuration FilesCAPEC-15 · Command DelimitersCAPEC-136 · LDAP InjectionCAPEC-248 · Command InjectionCAPEC-76 · Manipulating Web Input to File System CallsCAPEC-43 · Exploiting Multiple Input Interpretation LayersCAPEC-183 · IMAP/SMTP Command Injection
  • T1562.003Impair Defenses: Impair Command History Logging
  • T1574.006Hijack Execution Flow: Dynamic Linker Hijacking
  • T1574.007Hijack Execution Flow: Path Interception by PATH Environment Variable

CISA KEV details

CISA lists a CVE here once it has evidence of exploitation against real targets.

Listed

Mar 25, 2022

Federal deadline

Apr 15, 2022

passed 1,694 days ago

Ransomware use

Unknown

CISA records ransomware use only for campaigns it has confirmed, so “Unknown” means unrecorded, not ruled out. The deadline binds US federal agencies; for everyone else it is a date to argue against.

Public exploit

Capability, not use: code existing is a different claim from anyone running it.

PoC repos

267

2 of the 5 sampled are weaponized

Exploit entries

14

Exploit-DB and CTI exploit indexes

Malware

Families a CTI source ties to this CVE. One named, with the total it tracks.

Families tracked

1

Named

Morte

morte

Social mentions

Posts naming this CVE. Attention, not evidence of exploitation — it spikes on disclosure and decays whether or not anything is exploited.

Detection

Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.

  • Search application, proxy, and WAF logs for requests touching /cgi/cgi_main.c.
  • Prioritize edge telemetry for network-reachable PHP.
  • Monitor for scanner or exploit-pattern traffic after 281 public PoC repositories were reported.
web/proxy/WAF logsapplication logsnetwork IDS/IPSEDR process telemetryhost service logs

Groups associated with this CVE

Groups reported in connection with this vulnerability. A reported association, not a confirmed observation of that group using it — and not scoped to any sector or campaign.

APT35InfyComment CrewKinsingTeamTNT
SOCRadar1 more threat groups on this CVEShowing 5 of 6 · Attribution, campaigns and the malware each one runsUnlock free
  • ip188.43.204.4565

    Zonefiles · Dec 25, 2023

  • hostnameszmeryzblokowegokorytarza.xyz64

    Hole Cert · Jun 12, 2026

  • hostnameyagmurteacher.com64

    Hole Cert · Jul 8, 2026

  • hostnamebrandsy.co64

    Hole Cert · Aug 4, 2026

  • hostnamecaterpillaroos.info77

    Hole Cert · Oct 9, 2026

SOCRadar5 more indicators on this CVEShowing 5 of 10 · Hashes, addresses and domains from a live threat exchangeUnlock free

Timeline

What happened to this CVE, newest first — with the readings a source repeats on a schedule counted underneath rather than listed.

  1. 2026
  2. Cve is exploited mujtaba815/metasploitable2-php-cgi-exploit

    Oct 10, 2026 · SOCRadar CTI

  3. Added · CVSS 3.1 7.5 (AV:N)

    Jun 16, 2026 · NVD

  4. Cve is exploited hackherMind-Pixel/Vulnerable-Lab-Exploitation

    Apr 8, 2026 · SOCRadar CTI

  5. Cve is exploited nulltrace1336/PHP-CGI-Argument-Injection-Exploit

    Apr 8, 2026 · SOCRadar CTI

  6. 2025
  7. Bulletin released on Mitre.

    Jul 28, 2025 · SOCRadar CTI

  8. 2022
  9. Added · GHSA-3p37-hv77-x3rp published (high)

    May 14, 2022 · GitHub Security Advisory

  10. Added to CISA KEV catalog

    Mar 25, 2022 · CISA

  11. 2013
  12. Added · remote entry: Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution (RCE) + Scanner

    Oct 31, 2013 · Exploit-DB

  13. Added · Verified remote entry: Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution (RCE)

    Oct 29, 2013 · Exploit-DB

  14. 2012
  15. Initial · CVE published

    May 11, 2012 · NVD

  16. Added · Verified remote entry: PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)

    May 4, 2012 · Exploit-DB

Source activity

Readings a source repeats on a schedule, counted rather than listed.

  • 10×Github ReposDec 24, 2025 – Oct 8, 2026 · SOCRadar CTI
  • 9×TweetsMar 19, 2025 – Oct 22, 2026 · SOCRadar CTI
  • 4×SVRS was changedApr 8, 2026 – Oct 10, 2026 · SOCRadar CTI
  • 1×2 times mentioned on 2 Telegram channelsApr 22, 2026 · SOCRadar CTI
  • 1×CVE appeared in the Cve Trends.Dec 2, 2025 · SOCRadar CTI

References

49 on the record

Coverage

8 stories from the feeds we poll

Related CVEs

Same product first, then the same weakness or threat actor.

Elsewhere on this site

Not in any source we poll

Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.

  • Only the 5 indicator(s) reported for this CVE are available; no packet-level or host-forensic artifacts supplied.
  • No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
  • No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record1

What should defenders know first?

CVE-2012-1823 is PHP-CGI Query String Parameter Vulnerability, a high vulnerability affecting PHP from PHP. The current evidence lists it in CISA KEV, and the exploit status is: Yes: CISA KEV signal present. Public exploit evidence is: 281 public PoC repositories reported; 2 marked weaponized in current dataset. The affected-version evidence is listed in the key facts and affected products tables. Defenders should first verify whether exposed or business-critical assets run those versions, then apply vendor patches or mitigations, restrict reachable attack surface, and preserve logs for detection review. CVSS 7.5 describes technical severity, while EPSS 100% helps estimate near-term exploit likelihood; neither replaces asset context. Unknown fields should remain explicit in tickets, and threat actor, IOC, victimology, or payload claims should not be added unless a cited source supports them. Monitor CISA KEV, vendor advisories, NVD changes, public PoC repositories, and internal telemetry for update triggers.