Actively exploited · Published May 11, 2012 · Assigned by certcc
CVE-2012-1823
Critical 9.8 Exploited
In plain English
A critical-severity command injection in PHP from PHP. Attackers are actively exploiting it in the wild (listed by CISA on March 25, 2022). The chance it is exploited in the next 30 days is estimated at 100.0% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, Nuclei, public proof-of-concept code. Apply updates per vendor instructions.
CISA guidance
Apply updates per vendor instructions.
Federal agencies must remediate by Apr 15, 2022.
Official 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.
Affected products (as reported)
Weakness: CWE-77 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- SSRT100856 vendor-advisory
- SUSE-SU-2012:0604 vendor-advisory
- 1027022 vdb-entry
- HPSBMU02786 vendor-advisory
- MDVSA-2012:068 vendor-advisory
- openSUSE-SU-2012:0590 vendor-advisory
- RHSA-2012:0546 vendor-advisory
- RHSA-2012:0568 vendor-advisory
- RHSA-2012:0569 vendor-advisory
- http://www.php.net/ChangeLog-5.php#5.4.2
- 49014 third-party-advisory
- RHSA-2012:0570 vendor-advisory
- SUSE-SU-2012:0598 vendor-advisory
- https://bugs.php.net/bug.php?id=61910
- VU#673343 third-party-advisory
- RHSA-2012:0547 vendor-advisory
- APPLE-SA-2012-09-19-2 vendor-advisory
- http://support.apple.com/kb/HT5501
- http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- 49065 third-party-advisory
- VU#520827 third-party-advisory
- https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1
- DSA-2465 vendor-advisory
- 49085 third-party-advisory
- http://www.php.net/archive/2012.php#id2012-05-03-1
- 49087 third-party-advisory
- [oss-security] 20240606 PHP security releases 8.3.8, 8.2.20, and 8.1.29 mailing-list
- FEDORA-2024-49aba7b305 vendor-advisory
- FEDORA-2024-52c23ef1ec vendor-advisory
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2012-1823 government-resource