CVE-2012-1823

published 11 May 2012 · updated 4 Nov 2025

PHP-CGI Query String Parameter Vulnerability

10.0CriticalCVSS 9.8EPSS 100%CISA KEV · due 15 Apr 20226 public exploits

Exploited in the wild, in CISA KEV since 25 Mar 2022 (due 15 Apr 2022), with 6 public exploits. No fixed version is recorded.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
PHPPHP

Exploit evidence

6 public sources

kev

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in PHP, strongest first

10.0CriticalCISA KEVPublic exploit
10.0CriticalCISA KEVPublic exploit

Embed

A live severity badge for an advisory, README or ticket

CVE-2012-1823 severity on Zeptric[![CVE-2012-1823](https://zeptric.io/badge/cve/CVE-2012-1823.svg)](https://zeptric.io/cve/CVE-2012-1823)