Skip to content

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.

CVSS
9.8Criticalscored by CISA
Exploited in the wild
Yes, in CISA KEV since 25 Mar 2022CISA deadline for US federal agencies: 15 Apr 2022public exploit code
EPSS
> 99.9%chance of exploitation in the next 30 daystop 0.1% of scored CVEsFIRST score of 11 Nov 2026
Fix
Patch availablesee the advisories in the references
Published
11 May 2012analysed here 12 Nov 2026

Do first. Apply updates per vendor instructions. (CISA's required action for this KEV entry)

Summary

Triage

Attack surface
Server-side
Exploitable
At runtime
Attack vector
network
Weakness
Can a WAF block it?
Partly. See why

The summary, impact and action text on this page are written by our AI analysis pipeline, or taken from the NVD description when a CVE was imported from NVD. They are not the vendor's wording: check them against the sources. A longer AI executive summary and technical analysis are generated for signed-in accounts on the Max plan.

Affected products

Products named in our analysis

  • php:php
  • fedoraproject:fedora
  • debian:debian_linux
  • hp:hp-ux
  • opensuse:opensuse
  • suse:linux_enterprise_server
  • suse:linux_enterprise_software_development_kit
  • apple:mac_os_x
  • redhat:application_stack
  • redhat:gluster_storage_server_for_on-premise
  • redhat:storage
  • redhat:storage_for_public_cloud
  • redhat:enterprise_linux_desktop
  • redhat:enterprise_linux_eus
  • redhat:enterprise_linux_server
  • redhat:enterprise_linux_server_aus
  • redhat:enterprise_linux_workstation

Fix and mitigation

WAF and other mitigations

Can a WAF block it? Partly. Command injection puts shell syntax into the request. WAF rules catch common shell commands but miss encoded or unusual payloads.

Also consider: input validation · RASP

Based on the weakness type only; no CVE-specific evidence yet. We check Cloudflare, AWS, Google Cloud Armor and Azure; for Akamai, Imperva, Fastly, F5, ask your vendor.

Remediation steps (AI-written)

Step-by-step remediation is generated for accounts on the Max plan, for CVEs that match a technology in their stack. Add this technology to your stack to see the fix checklist.

Exploitation evidence

CISA KEV catalog
Listed since 25 Mar 2022.
CISA due date
15 Apr 2022, the remediation deadline for US federal agencies
CISA required action
Apply updates per vendor instructions.
Public exploit code
Yes: 4 on Exploit-DB · 1 Metasploit module · 16 GitHub proofs of concept · 1 Nuclei template
CISA SSVC
exploitation active, automatable yes, technical impact totalAssessed by CISA 7 Feb 2025 (SSVC 2.0.3). Exploitation is none, poc (public proof of concept) or active.

Exploit-DB

Metasploit

Nuclei

GitHub proofs of concept

and 12 more repositories

Listed so you can judge urgency, not as a recommendation to run anything. GitHub “proofs of concept” are unvetted: some are fake or carry malware. Exploit-DB marks the entries its staff verified.

Timeline

  1. 4 May 2012First public exploit or proof of concept
  2. 11 May 2012Published7 days later
  3. 25 Mar 2022Added to CISA KEV (exploited in the wild)3,605 days (about 10 years) later
  4. 15 Apr 2022CISA remediation due date (US federal agencies)21 days later
  5. 7 Feb 2025CISA SSVC assessment: exploitation active1,030 days (about 3 years) later
  6. 4 Nov 2025CVE record last updated270 days (about 9 months) later
  7. 12 Nov 2026Analysed by vulneraibility.com373 days (about 1 year) later

CVSS vector

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

MetricValueWhat it means
Attack vectorNetworkReachable over the internet or any routable network.
Attack complexityLowRepeatable attack, no special conditions.
Privileges requiredNoneThe attacker needs no prior access.
User interactionNoneNo victim action needed.
ScopeUnchangedImpact stays within the vulnerable component.
ConfidentialityHighTotal data disclosure possible.
IntegrityHighComplete modification possible.
AvailabilityHighFull outage possible.

Common questions

Is CVE-2012-1823 being exploited?

Yes. CVE-2012-1823 appears in CISA's Known Exploited Vulnerabilities catalog, which means exploitation in the wild has been confirmed and reported. Treat it as active rather than theoretical, and patch it ahead of higher-scoring vulnerabilities that carry no exploitation evidence.

How severe is CVE-2012-1823?

CVE-2012-1823 is rated Critical with a CVSS score of 9.8. Severity describes how bad exploitation would be, not how likely it is: pair it with exploitation evidence before deciding what to patch first.

Is there a patch for CVE-2012-1823?

Yes. A fix has been recorded for CVE-2012-1823. The vendor advisory is the authority on the exact fixed version — apply it from there rather than from a summary.

What does CVE-2012-1823 affect?

CVE-2012-1823 affects php:php, fedoraproject:fedora, debian:debian_linux, hp:hp-ux, and 13 further products or versions. Confirm the exact affected versions against the vendor advisory before deciding you are exposed.

Exploitation status reflects CISA's KEV catalog as we last synced it. Check the catalog directly.

References

NVDCVE.orgCVE DetailsSource

31 references in the CVE record, grouped by the tags the record gives them.

Advisories (21)

Show 15 more

Other links (10)

Show 4 more

Where the data on this page comes from

Summary, impact and triage tags: written by our AI analysis pipeline from the sources above. Check them against the sources.

Similar CVEs

Get CVEs like this by email. Join the free digest: the CVEs we flag as major, all CVSS 8.0 or higher, in up to three emails a day (sent at 05:00, 11:00 and 15:00 UTC). Matching alerts to the products you run needs an account, and accounts are invite-only during the beta.

© 2026 vulneraibility.com