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…
- Published
- Updated
- Reserved
- Assigned by
- certcc
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.
Exploited in the wild
CISA lists this vulnerability in its Known Exploited Vulnerabilities catalog as PHP-CGI Query String Parameter Vulnerability.
- Added
- 25 Mar 2022
- Fix due (US federal)
- 15 Apr 2022
- Used by ransomware
- Not known
Apply updates per vendor instructions.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 100.0% · top 0.1% of all CVEs (2 Nov 2026)
- CISA SSVC
- Exploitation: active · Automatable: yes · Technical impact: total
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Weakness
Affected products
n/a
- affected n/a
References (31)
- SSRT100856 (opens in a new tab)vendor-advisoryx_transferred
- SUSE-SU-2012:0604 (opens in a new tab)vendor-advisoryx_transferred
- 1027022 (opens in a new tab)vdb-entryx_transferred
- HPSBMU02786 (opens in a new tab)vendor-advisoryx_transferred
- MDVSA-2012:068 (opens in a new tab)vendor-advisoryx_transferred
- openSUSE-SU-2012:0590 (opens in a new tab)vendor-advisoryx_transferred
- RHSA-2012:0546 (opens in a new tab)vendor-advisoryx_transferred
- RHSA-2012:0568 (opens in a new tab)vendor-advisoryx_transferred
- RHSA-2012:0569 (opens in a new tab)vendor-advisoryx_transferred
- http://www.php.net/ChangeLog-5.php#5.4.2 (opens in a new tab)x_transferred
- 49014 (opens in a new tab)third-party-advisoryx_transferred
- RHSA-2012:0570 (opens in a new tab)vendor-advisoryx_transferred
- SUSE-SU-2012:0598 (opens in a new tab)vendor-advisoryx_transferred
- https://bugs.php.net/bug.php?id=61910 (opens in a new tab)x_transferred
- VU#673343 (opens in a new tab)third-party-advisoryx_transferred
- RHSA-2012:0547 (opens in a new tab)vendor-advisoryx_transferred
- APPLE-SA-2012-09-19-2 (opens in a new tab)vendor-advisoryx_transferred
- http://support.apple.com/kb/HT5501 (opens in a new tab)x_transferred
- http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/ (opens in a new tab)x_transferred
- 49065 (opens in a new tab)third-party-advisoryx_transferred
- VU#520827 (opens in a new tab)third-party-advisoryx_transferred
- https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1 (opens in a new tab)x_transferred
- DSA-2465 (opens in a new tab)vendor-advisoryx_transferred
- 49085 (opens in a new tab)third-party-advisoryx_transferred
- http://www.php.net/archive/2012.php#id2012-05-03-1 (opens in a new tab)x_transferred
- 49087 (opens in a new tab)third-party-advisoryx_transferred
- [oss-security] 20240606 PHP security releases 8.3.8, 8.2.20, and 8.1.29 (opens in a new tab)mailing-listx_transferred
- FEDORA-2024-49aba7b305 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2024-52c23ef1ec (opens in a new tab)vendor-advisoryx_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ (opens in a new tab)
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2012-1823 (opens in a new tab)government-resource
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- CISA KEV catalog (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Record last updated .