CVE-2012-1823
PHP-CGI Query String Parameter Vulnerability
- Actively exploited
- Critical · 9.8 of 10
- Exploited since
- 25 Mar 2022 added to the CISA list
- Chance of attacks
- over 99.9% in the next 30 days (FIRST EPSS)
- Fix deadline
- 15 Apr 2022 for US federal agencies
- Published
- 11 May 2012 in the NVD
What this means
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.
CISA
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.
NIST National Vulnerability Database
What to do
Apply updates per vendor instructions.
CISA's required action. If you use the product, install the vendor's update as soon as possible.
Affected
- n/a n/a
Official sources
- nvd.nist.gov/vuln/detail/CVE-2012-1823
- eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
- lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- marc.info/?l=bugtraq&m=134012830914727&w=2
- rhn.redhat.com/errata/RHSA-2012-0546.html
Data from the NIST National Vulnerability Database, the CISA Known Exploited Vulnerabilities list, FIRST EPSS and ENISA, checked 18 Nov 2026. CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.