← All CVEs

CVE-2012-2311

high · 7.5

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.

7.5
CVSS
69.3%
EPSS (exploit prob.)
99th
EPSS percentile
2012-05-11
Published

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

Weaknesses

CWE-89

Affected products

VendorProductAffected versions
phpphp<= 5.3.12
phpphp1.0
phpphp2.0
phpphp2.0b10
phpphp3.0
phpphp3.0.1
phpphp3.0.2
phpphp3.0.3
phpphp3.0.4
phpphp3.0.5
phpphp3.0.6
phpphp3.0.7
phpphp3.0.8
phpphp3.0.9
phpphp3.0.10
phpphp3.0.11
phpphp3.0.12
phpphp3.0.13
phpphp3.0.14
phpphp3.0.15
phpphp3.0.16
phpphp3.0.17
phpphp3.0.18
phpphp4.0
phpphp4.0
phpphp4.0
phpphp4.0
phpphp4.0
phpphp4.0.0
phpphp4.0.1
phpphp4.0.2
phpphp4.0.3
phpphp4.0.4
phpphp4.0.5
phpphp4.0.6
phpphp4.0.7
phpphp4.1.0
phpphp4.1.1
phpphp4.1.2
phpphp4.2.0

Check a specific version with /api/v1/cve/match.

References

Query this programmatically:

curl https://evil-db.io/api/v1/cve/CVE-2012-2311