Vulnerabilities

Vulnerability · CVE-2012-2311

PHP PHP Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Published May 9, 2012 · catalog updated May 9, 2012 · PHP PHP

Patch now

CVE-2012-2311 is in the CISA known-exploited catalog. Confirm PHP PHP against the vendor advisory and apply that fix. The CVSS score does not change the priority.

Gaps on this record

  • No version range is stored. A customer cannot check an installed version against this record.
Severity
Unknown—
Known exploitation
CISA KEV and VulnCheck KEV
EPSS
69.27%
Remediation
Remediation guidance
Affected products
vendor PHP PHP

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.

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • vendor PHP PHPversion unspecified

How to fix CVE-2012-2311

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

CVE-2012-2311 is in the CISA known-exploited catalog. Confirm PHP PHP against the vendor advisory and apply that fix. The CVSS score does not change the priority.

Which versions are affected?

Affected version ranges are not on this record. Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.

What should an analyst verify?

No weakness class is stored. EPSS 69.27%. The CISA KEV listing is the exploitation evidence. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

No public source repository is identified for this product.

Timeline

Detection, updates, and resolution for this record.

  1. May 9, 2012 · VulnCheck KEV

    Detected

    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

  2. May 9, 2012 · CISA KEV

    Known exploited

    Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.

Sources

  • CVE.orgVulnerability recordCVE-2012-2311

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2012-2311

    30-day exploitation probability 69.3%

    first.org
  • VulnCheck KEVConfirmed exploitationCVE-2012-2311

    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

    vulncheck.com

References

Freshness

Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.