CVE-2012-1823
CONFIRMED EXPLOITEDPHP-CGI Query String Parameter Vulnerability
Is PHP PHP affected by CVE-2012-1823?
PHP PHP is listed in the CISA Known Exploited Vulnerabilities catalog for CVE-2012-1823, added on 2022-03-25. CISA only adds a CVE once it has evidence of exploitation in the wild, so the patching question is not whether it can be attacked but how soon your instances must be updated.
Affected products published by NIST NVD (30 vulnerable CPE entries): apple mac_os_x, debian debian_linux, fedoraproject fedora, hp hp-ux, opensuse opensuse and php php and 11 further CPE product entries.
Published CPE version bounds mark releases below 10.8.2 as vulnerable. Those bounds describe what is affected, not what patches it: upgrade to the fixed release named in the vendor advisory below, then confirm the installed version with your package manager or scanner.
The CISA remediation deadline for this entry is 2022-04-15.
RELATED VULNERABILITY DOSSIERS
Other catalog entries that share this product, vendor, or weakness, or that sit next to this advisory in the CISA KEV timeline.
- CVE-2016-10033Same vendorPHP PHPMailer
PHPMailer Command Injection Vulnerability
- CVE-2019-11043Same vendorPHP FastCGI Process Manager (FPM)
PHP FastCGI Process Manager (FPM) Buffer Overflow Vulnerability
- CVE-2023-25915Shared weaknessDanfoss AK-SM 800A Series
Danfoss AK-SM 800A Series Improper Input Validation Vulnerability
- CVE-2026-116779Shared weaknessSignalWire FreeSwitch
SignalWire FreeSwitch Code Injection Vulnerability
- CVE-2010-4345Neighboring entryExim Exim
Exim Privilege Escalation Vulnerability
- CVE-2013-2251Neighboring entryApache Struts
Apache Struts Improper Input Validation Vulnerability
1. VULNERABILITY OVERVIEW & TECHNICAL MECHANISM
sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.
Get Stack Watch email when a KEV hits your stack ($99/year or $12/month)
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.
2. AFFECTED VERSIONS, PRODUCTS & VERIFIED CPE CONFIGURATIONS
3. EXPLOITATION EVIDENCE, IMPACT & HOW TO DETECT IT
This vulnerability was added to the CISA Known Exploited Vulnerabilities (KEV) catalog on 2022-03-25. Inclusion in KEV requires verified evidence of active exploitation in the wild. Known ransomware campaign use is recorded by CISA as: "Unknown".
Note: KEV inclusion confirms that threat actors have exploited this flaw in real-world incidents; it does not imply every deployment of PHP has been compromised.
- CVSS vector indicates high impact to Confidentiality (C:H), Integrity (I:H), and Availability (A:H) of the affected component.
- HTTP / web application surface (PHP PHP): inspect reverse-proxy, WAF, and application access/error logs alongside `Zeek http.log` and `Suricata eve.json` for anomalous requests targeting exposed endpoints.
- Command/Argument Injection class (CWE-77/78/88): monitor process trees for `/bin/sh`, `bash`, `cmd.exe`, `powershell`, `curl`, or `wget` spawned as child processes of the service daemon.
- Inventory all hosts running PHP PHP and compare installed package/build versions against the NVD CPE configurations and vendor advisory below.
4. FIXED VERSION, MITIGATIONS & OFFICIAL ADVISORY CITATIONS
Apply updates per vendor instructions.
- http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/Broken LinkExploit
- http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041Broken Link
- http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.htmlMailing ListThird Party Advisory
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.htmlMailing ListThird Party Advisory
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.htmlMailing ListThird Party Advisory
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.htmlMailing ListThird Party Advisory
- http://marc.info/?l=bugtraq&m=134012830914727&w=2Mailing List
- http://rhn.redhat.com/errata/RHSA-2012-0546.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0547.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0568.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0569.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0570.htmlThird Party Advisory
- http://secunia.com/advisories/49014Broken Link
- http://secunia.com/advisories/49065Broken Link
- http://secunia.com/advisories/49085Broken Link
- http://secunia.com/advisories/49087Broken Link
- http://support.apple.com/kb/HT5501Third Party Advisory
- http://www.debian.org/security/2012/dsa-2465Third Party Advisory
- http://www.kb.cert.org/vuls/id/520827ExploitThird Party AdvisoryUS Government Resource
- http://www.kb.cert.org/vuls/id/673343Third Party AdvisoryUS Government Resource
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:068Broken Link
- http://www.openwall.com/lists/oss-security/2024/06/07/1Mailing List
- http://www.php.net/ChangeLog-5.php#5.4.2ExploitPatchRelease Notes
- http://www.php.net/archive/2012.php#id2012-05-03-1Release Notes
- http://www.securitytracker.com/id?1027022Broken LinkThird Party AdvisoryVDB Entry
SCORING & VECTOR TELEMETRY
NIST NVD score not yet provided. Score attributed to CISA-ADP (134c704f-9b21-4f2e-91b3-4a467353bcc0, Secondary / CNA assessment distributed via NVD).
EPSS estimates the statistical probability of exploitation activity in the next 30 days—it is not proof of confirmed exploitation.
RELEVANT DEFENSIVE TOOLS
Curated open-source defensive and verification utilities from The Loot applicable to this asset class:
Fast, template-driven vulnerability scanner by ProjectDiscovery
Intercepting web proxy and automated web application security testing tool
Multi-threaded IDS, IPS, and network security monitoring engine
Behavior-based open-source intrusion prevention system (IPS) and log analysis engine