CVE-2012-1823 KEV EXPLOIT
9.8
CRITICAL · CVSS 3.1 · EPSS 100% (pctl 100)
Patch first
On CISA KEV — known exploited in the wild, due 2022-04-15.
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.
Scoring
| CVSS | 9.8 (CRITICAL, v3.1) |
|---|---|
| Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| EPSS | 100% — more likely to be exploited than 100% of all CVEs |
| Weakness | CWE-77 |
| On CISA KEV | yes — remediate by 2022-04-15 |
| Public exploit | yes |
| Published | 2012-05-11 |
| Last modified | 2026-06-16 |
CISA KEV
| Name | PHP-CGI Query String Parameter Vulnerability |
|---|---|
| Added | 2022-03-25 |
| Due | 2022-04-15 |
| Vendor / product | PHP / PHP |
| Ransomware use | none reported |
Affected (17)
| Vendor | Product |
|---|---|
| apple | mac os x |
| debian | debian linux |
| fedoraproject | fedora |
| hp | hp-ux |
| opensuse | opensuse |
| php | php |
| redhat | application stack |
| redhat | enterprise linux desktop |
| redhat | enterprise linux eus |
| redhat | enterprise linux server |
| redhat | enterprise linux server aus |
| redhat | enterprise linux workstation |
| redhat | gluster storage server for on-premise |
| redhat | storage |
| redhat | storage for public cloud |
| suse | linux enterprise server |
| suse | linux enterprise software development kit |
Public exploits
| Source | Title | Date |
|---|---|---|
| exploit-db | Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner | 2013-10-31 |
| exploit-db | Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution | 2013-10-29 |
| exploit-db | PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection | 2012-05-05 |
| exploit-db | PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit) | 2012-05-04 |
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
→ the Explorer · watch your stack · NVD