Skip to content
Fencer Intel
high 7.5

CVE-2012-2311 in the critical feed json

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 qu…

published 2012-05-11 14 y ago modified 2026-06-16 4 mo ago also EUVD-2012-2304

cvss
7.5
version 2.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
69.3%
EPSS 69.3% chance of exploitation in 30 days, percentile 99.3%
public exploits
4
Exploit-DB

Summary

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 contain a %3D sequence but no = (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. NOTE: this vulnerability exists because of an incomplete fix for CVE-2012-1823.

Patch / fix

  • php7 openSUSE Tumbleweed 7.0.14-1.4
  • php5 openSUSE Tumbleweed 5.6.28-1.1

opensuse advisories openSUSE-SU-2024:10290-1openSUSE-SU-2024:10344-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2012-2311 updated cvss 6.8

php: incomplete CVE-2012-1823 fix - incorrect check for =

  • Red Hat Enterprise Linux 4 php Red Hat Enterprise Linux 5 php, php53 Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Timeline

  1. First public exploit (EDB-18834)
  2. Published

Exploit prediction

69.27% chance of exploitation in the next 30 days, higher than 99.3% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • EDB-29316 Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner remote, 2013-10-31
  • EDB-29290 Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution remote, 2013-10-29
  • EDB-18836 PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection remote, 2012-05-05
  • EDB-18834 PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit) remote, 2012-05-04

CVSS scores

assigned by version score vector
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

Weakness
  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Technology feeds

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.