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 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.

INFO

Published Date :

May 11, 2012, 10:15 a.m.

Last Modified :

April 11, 2025, 12:51 a.m.

Source :

secalert@redhat.com

Remotely Exploitable :

Yes !

Impact Score :

6.4

Exploitability Score :

10.0
Public PoC/Exploit Available at Github

CVE-2012-2311 has a 1 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2012-2311 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Php php
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2012-2311.

URL Resource
http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
http://marc.info/?l=bugtraq&m=134012830914727&w=2
http://marc.info/?l=bugtraq&m=134012830914727&w=2
http://secunia.com/advisories/49014
http://secunia.com/advisories/49085
http://support.apple.com/kb/HT5501
http://www.debian.org/security/2012/dsa-2465
http://www.kb.cert.org/vuls/id/520827 US Government Resource
http://www.php.net/ChangeLog-5.php#5.4.3
http://www.php.net/archive/2012.php#id2012-05-08-1
http://www.securitytracker.com/id?1027022
https://bugs.php.net/bug.php?id=61910 Vendor Advisory
https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff-fix-check.patch&revision=1336093719&display=1
https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
http://marc.info/?l=bugtraq&m=134012830914727&w=2
http://marc.info/?l=bugtraq&m=134012830914727&w=2
http://secunia.com/advisories/49014
http://secunia.com/advisories/49085
http://support.apple.com/kb/HT5501
http://www.debian.org/security/2012/dsa-2465
http://www.kb.cert.org/vuls/id/520827 US Government Resource
http://www.php.net/ChangeLog-5.php#5.4.3
http://www.php.net/archive/2012.php#id2012-05-08-1
http://www.securitytracker.com/id?1027022
https://bugs.php.net/bug.php?id=61910 Vendor Advisory
https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff-fix-check.patch&revision=1336093719&display=1
https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

Dockerfile PHP

Updated: 3 months, 1 week ago
0 stars 1 fork 1 watcher
Born at : Aug. 17, 2020, 7:54 p.m. This repo has been linked 2 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2012-2311 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2012-2311 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
    Added Reference http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
    Added Reference http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
    Added Reference http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
    Added Reference http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
    Added Reference http://marc.info/?l=bugtraq&m=134012830914727&w=2
    Added Reference http://marc.info/?l=bugtraq&m=134012830914727&w=2
    Added Reference http://secunia.com/advisories/49014
    Added Reference http://secunia.com/advisories/49085
    Added Reference http://support.apple.com/kb/HT5501
    Added Reference http://www.debian.org/security/2012/dsa-2465
    Added Reference http://www.kb.cert.org/vuls/id/520827
    Added Reference http://www.php.net/archive/2012.php#id2012-05-08-1
    Added Reference http://www.php.net/ChangeLog-5.php#5.4.3
    Added Reference http://www.securitytracker.com/id?1027022
    Added Reference https://bugs.php.net/bug.php?id=61910
    Added Reference https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff-fix-check.patch&revision=1336093719&display=1
    Added Reference https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
    Added Reference https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
  • CVE Modified by secalert@redhat.com

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by secalert@redhat.com

    Nov. 07, 2023

    Action Type Old Value New Value
    Changed 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 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. 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.
  • CVE Modified by secalert@redhat.com

    Feb. 13, 2023

    Action Type Old Value New Value
    Changed 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 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. 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.
  • CVE Modified by secalert@redhat.com

    Jan. 18, 2018

    Action Type Old Value New Value
    Added Reference http://www.debian.org/security/2012/dsa-2465 [No Types Assigned]
    Added Reference http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html [No Types Assigned]
    Added Reference http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html [No Types Assigned]
  • CVE Modified by secalert@redhat.com

    Jan. 05, 2018

    Action Type Old Value New Value
    Added Reference http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html [No Types Assigned]
  • Initial Analysis by nvd@nist.gov

    May. 11, 2012

    Action Type Old Value New Value
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2012-2311 is associated with the following CWEs:

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

92.60 }} 0.46%

score

0.99740

percentile

CVSS2 - Vulnerability Scoring System
Access Vector
Access Complexity
Authentication
Confidentiality
Integrity
Availability