CVE-2012-1823
CVE-2012-1823 is a critical-severity vulnerability in Php with a CVSS 3.x base score of 9.8. It is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, confirming it has been exploited in the wild (added 2022-03-25). The underlying weakness is classified as CWE-77.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v2: 7.5
- EPSS exploit prediction: 100% (100th percentile)
- Actively exploited: Yes — listed in CISA KEV (added 2022-03-25)
- EU (EUVD) id: EUVD-2012-1833
- EU exploitation: Flagged exploited in the ENISA EU Vulnerability Database (since 2022-03-25)
- Weakness: CWE-77
- Affected product: Php
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is 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.
- How severe is CVE-2012-1823?
- CVE-2012-1823 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2012-1823 being actively exploited?
- Yes. CVE-2012-1823 is on CISA's Known Exploited Vulnerabilities (KEV) catalog, added on 2022-03-25, which means active exploitation has been confirmed. It should be prioritised for remediation.
- What products are affected by CVE-2012-1823?
- CVE-2012-1823 primarily affects Php. In total, 28 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2012-1823?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Because this CVE is known to be actively exploited, treat remediation as urgent — CISA KEV typically sets a short remediation deadline.
- Does CVE-2012-1823 have an EU (EUVD) identifier?
- Yes. CVE-2012-1823 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2012-1833. It is also flagged as exploited in the EUVD (since 2022-03-25).
- When was CVE-2012-1823 published?
- CVE-2012-1823 was published on 2012-05-11 and last updated on 2026-06-16.
References
- http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
- http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- http://marc.info/?l=bugtraq&m=134012830914727&w=2
- http://rhn.redhat.com/errata/RHSA-2012-0546.html
- http://rhn.redhat.com/errata/RHSA-2012-0547.html
- http://rhn.redhat.com/errata/RHSA-2012-0568.html
- http://rhn.redhat.com/errata/RHSA-2012-0569.html
- http://rhn.redhat.com/errata/RHSA-2012-0570.html
- http://secunia.com/advisories/49014
- http://secunia.com/advisories/49065
- http://secunia.com/advisories/49085
- http://secunia.com/advisories/49087
- http://support.apple.com/kb/HT5501
- http://www.debian.org/security/2012/dsa-2465
- http://www.kb.cert.org/vuls/id/520827
- http://www.kb.cert.org/vuls/id/673343
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:068
- http://www.openwall.com/lists/oss-security/2024/06/07/1
- http://www.php.net/ChangeLog-5.php#5.4.2
- http://www.php.net/archive/2012.php#id2012-05-03-1
- http://www.securitytracker.com/id?1027022
- https://bugs.php.net/bug.php?id=61910
- https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
Affected products (28)
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:6.0:*:*:*:*:*:*:*
- cpe:2.3:o:hp:hp-ux:b.11.23:*:*:*:*:*:*:*
- cpe:2.3:o:hp:hp-ux:b.11.31:*:*:*:*:*:*:*
- cpe:2.3:o:opensuse:opensuse:11.4:*:*:*:*:*:*:*
- cpe:2.3:o:opensuse:opensuse:12.1:*:*:*:*:*:*:*
- cpe:2.3:o:suse:linux_enterprise_server:10:sp4:*:*:-:*:*:*
- cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:-:*:*
- cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:vmware:*:*
- cpe:2.3:o:suse:linux_enterprise_software_development_kit:10:sp4:*:*:*:*:*:*
- cpe:2.3:o:suse:linux_enterprise_software_development_kit:11:sp2:*:*:*:*:*:*
- cpe:2.3:o:apple:mac_os_x:*:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:application_stack:2.0:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:gluster_storage_server_for_on-premise:2.0:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:storage:2.0:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:storage_for_public_cloud:2.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_eus:5.6:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_eus:6.1:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_eus:6.2:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server:5.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server_aus:5.3:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server_aus:5.6:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_workstation:5.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*
More vulnerabilities in Php
- CVE-2015-0235 — Critical (CVSS 10.0): Heap-based buffer overflow in the __nss_hostname_digits_dots function in glibc 2.2, and other 2.x versions before 2.18,…
- CVE-2012-2688 — Critical (CVSS 10.0): Unspecified vulnerability in the _php_stream_scandir function in the stream implementation in PHP before 5.3.15 and…
- CVE-2012-2376 — Critical (CVSS 10.0): Buffer overflow in the com_print_typeinfo function in PHP 5.4.3 and earlier on Windows allows remote attackers to…
- CVE-2011-3268 — Critical (CVSS 10.0): Buffer overflow in the crypt function in PHP before 5.3.7 allows context-dependent attackers to have an unspecified…
- CVE-2009-4143 — Critical (CVSS 10.0): PHP before 5.2.12 does not properly handle session data, which has unspecified impact and attack vectors related to (1)…
- CVE-2008-5557 — Critical (CVSS 10.0): Heap-based buffer overflow in ext/mbstring/libmbfl/filters/mbfilter_htmlent.c in the mbstring extension in PHP 4.3.0…
Other CWE-77 (Command Injection) vulnerabilities
- CVE-2026-23652 — Critical (CVSS 10.0): Improper neutralization of special elements used in a command ('command injection') in Microsoft Power Pages allows an…
- CVE-2025-59818 — Critical (CVSS 10.0): This vulnerability allows authenticated attackers to execute arbitrary commands on the underlying system using the file…
- CVE-2025-64093 — Critical (CVSS 10.0): Remote Code Execution vulnerability that allows unauthenticated attackers to inject arbitrary commands into the…
- CVE-2025-64090 — Critical (CVSS 10.0): This vulnerability allows authenticated attackers to execute commands via the hostname of the device.
- CVE-2025-61492 — Critical (CVSS 10.0): A command injection vulnerability in the execute_command function of terminal-controller-mcp 0.1.7 allows attackers to…
- CVE-2025-10035 — Critical (CVSS 10.0): A deserialization vulnerability in the License Servlet of Fortra's GoAnywhere MFT allows an actor with a validly forged…
Browse all CWE-77 (Command Injection) vulnerabilities →
Threat intelligence
Threat-intel indicators referencing this CVE:
- 221.161.235.168 (ipv4-addr)
- 187.141.71.166 (ipv4-addr)
- 103.20.122.54 (ipv4-addr)
- 82.199.197.245 (ipv4-addr)
- 58.221.244.34 (ipv4-addr)
- 222.99.52.202 (ipv4-addr)
- 220.88.220.59 (ipv4-addr)
- 211.253.10.61 (ipv4-addr)