← Vulnerability feed

Vulnerability record · CVE-2012-2336 · published 11 May 2012

CVE-2012-2336: PHP CGI query string parsing flaw enables denial of service

Php · Php

PHP versions before 5.3.13 and 5.4.x before 5.4.3, when running as a CGI script (php-cgi), fail to properly handle query strings that lack an equals sign. This is an incomplete fix for CVE-2012-1823, allowing command-line options to be injected via the query string and causing resource consumption.

5.0 CVSS 2.0 Medium EPSS 50% · top 1.1% CWE-20 · Improper input validation
5.0CVSS 2.0 base score
50%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
16References
16 Jun 2026Last modified by NVD

Description

sapi/cgi/cgi_main.c in PHP before 5.3.13 and 5.4.x before 5.4.3, 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 cause a denial of service (resource consumption) by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'T' case. NOTE: this vulnerability exists because of an incomplete fix for CVE-2012-1823.

AV:N/AC:L/Au:N/C:N/I:N/A:P

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 20 September 2026. Confidence: high.

high priorityAlthough CVSS 2.0 rates it medium (5.0), the high EPSS percentile and the fact it is a bypass of a previously exploited flaw raise the practical risk.

What it is

PHP versions before 5.3.13 and 5.4.x before 5.4.3, when running as a CGI script (php-cgi), fail to properly handle query strings that lack an equals sign. This is an incomplete fix for CVE-2012-1823, allowing command-line options to be injected via the query string and causing resource consumption.

Impact

A remote attacker can cause a denial of service through resource consumption on the affected PHP CGI process. There is no confidentiality or integrity impact per the CVSS vector.

Attack surface

Reachable over the network via HTTP requests to a php-cgi endpoint; no authentication or user interaction is required per the CVSS vector AV:N/AC:L/Au:N.

Exploitation

Not listed in CISA KEV, but EPSS probability is 0.50337 (98.855th percentile), indicating a high likelihood of exploitation activity; references are vendor advisories and patches with no public exploit tags.

What to do

  • Upgrade PHP to 5.3.13 or 5.4.3 or later, which contain the complete fix.
  • If php-cgi cannot be patched immediately, disable or restrict CGI mode and use an alternative SAPI such as php-fpm.
  • Apply the vendor patch referenced in the PHP bug tracker for CVE-2012-1823/CVE-2012-2336.
  • Enforce web server rules that reject or sanitize query strings lacking an equals sign before they reach php-cgi.
  • Monitor and rate-limit requests to php-cgi endpoints to reduce resource exhaustion impact.

Detection

  • Inspect web server and php-cgi logs for query strings that do not contain an equals sign, especially those containing command-line option patterns.
  • Alert on abnormal resource consumption or process spawning tied to php-cgi requests.
  • Correlate requests to php-cgi with known CVE-2012-1823 exploitation attempts and the incomplete-fix bypass pattern.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2012-2336 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed9.8CVE-2019-11043PHP-FPM buffer overflow enables remote code executionPHP-FPM in certain configurations writes past allocated buffers into FCGI protocol data space, an out-of-bounds write (CWE-787, CWE-120). It affects …KEVEPSS 100%analysed9.8CVE-2012-1823PHP-CGI query string option injection enables remote code executionPHP versions before 5.3.12 and 5.4.x before 5.4.2, when run as a CGI script (php-cgi), mishandle query strings that lack an equals sign, allowing com…KEVEPSS 100%analysed10.0CVE-2015-0235glibc gethostbyname heap buffer overflow (GHOST)CVE-2015-0235 is a heap-based buffer overflow in the __nss_hostname_digits_dots function in glibc 2.2 and other 2.x versions before 2.18. It is reach…EPSS 95%analysed10.0CVE-2012-2688Php vulnerabilityUnspecified vulnerability in the _php_stream_scandir function in the stream implementation in PHP before 5.3.15 and 5.4.x before 5.4.5 has unknown im…EPSS 10%10.0CVE-2012-2376Php memory buffer overflow vulnerabilityBuffer overflow in the com_print_typeinfo function in PHP 5.4.3 and earlier on Windows allows remote attackers to execute arbitrary code via crafted …EPSS 20%10.0CVE-2011-3268Php memory buffer overflow vulnerabilityBuffer overflow in the crypt function in PHP before 5.3.7 allows context-dependent attackers to have an unspecified impact via a long salt argument, …EPSS 5.7%10.0CVE-2009-4143Php vulnerabilityPHP before 5.2.12 does not properly handle session data, which has unspecified impact and attack vectors related to (1) interrupt corruption of the S…EPSS 2.9%

Source: NIST National Vulnerability Database (record CVE-2012-2336), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.