CVE Watchtower

CVE-2012-1823Php Command Injection

NVDCVSS scored by 134c704f-9b21-4f2e-91b3-4a467353bcc0

Vulnerability Summary

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.
Severity Level
CRITICAL(9.8)
Published Date
May 11, 2012
Last Modified
Apr 21, 2026
PoC
Available(Metasploit, Nuclei)
Exploitation Status
ACTIVE
EPSS Score (30-Day)
94.36%Probability
Root Weakness (CWE)
The product constructs all or part of a command using externally-influenced input but does not neutralize special elements that could modify the intended command.
CVSS v3.1 Base Metrics — Score 9.8 (CRITICAL)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • Php < 5.3.12
  • Php >= 5.4.0 and < 5.4.2
  • Fedoraproject Fedora
  • Debian Linux
  • Hp-ux
  • Opensuse
  • Suse Linux Enterprise Server
  • Suse Linux Enterprise Software Development Kit
  • Apple Mac Os X >= 10.6.8 and < 10.7.5
  • Apple Mac Os X >= 10.8.0 and < 10.8.2
  • 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
Patched Versions
  • Php 5.3.12
  • Php 5.4.2
  • Apple Mac Os X 10.7.5
  • Apple Mac Os X 10.8.2

What to do

Patch now. CISA lists this flaw as exploited in the wild and set a federal remediation deadline of Apr 15, 2022.

  1. Check whether you run Php and which version.
  2. Update to a patched version listed above, then confirm the new version.
  3. Review logs and exposed services for signs of earlier compromise.

CISA required action: Apply updates per vendor instructions.

CISA KEV Status

Listed in Known Exploited Vulnerabilities
Added: Mar 25, 2022
Remediation due: Apr 15, 2022 (deadline passed)

Timeline

  • May 11, 2012Published
  • Mar 25, 2022Added to CISA KEV catalog
  • Apr 15, 2022KEV remediation due date
  • Apr 21, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new Php CVEsYou are reading CVE-2012-1823. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

External References

Data last checked: Nov 24, 2026 09:23 UTC