sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, 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 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.
Published 2012-05-11 10:15:48
Updated 2024-06-13 04:15:15
Source CERT/CC
View at NVD,   CVE.org
Vulnerability category: Execute code

Threat overview for CVE-2012-1823

Top countries where our scanners detected CVE-2012-1823
Top open port discovered on systems with this issue 80
IPs affected by CVE-2012-1823 205,048
Threat actors abusing to this issue? Yes
Find out if you* are affected by CVE-2012-1823!
*Directly or indirectly through your vendors, service providers and 3rd parties. Powered by attack surface intelligence from SecurityScorecard.

CVE-2012-1823 is in the CISA Known Exploited Vulnerabilities Catalog

CISA vulnerability name:
PHP-CGI Query String Parameter Vulnerability
CISA required action:
Apply updates per vendor instructions.
CISA description:
sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.
Added on 2022-03-25 Action due date 2022-04-15

Exploit prediction scoring system (EPSS) score for CVE-2012-1823

97.31%
Probability of exploitation activity in the next 30 days EPSS Score History
~ 100 %
Percentile, the proportion of vulnerabilities that are scored at or less

Metasploit modules for CVE-2012-1823

  • PHP CGI Argument Injection
    Disclosure Date: 2012-05-03
    First seen: 2020-04-26
    exploit/multi/http/php_cgi_arg_injection
    When run as a CGI, PHP up to version 5.3.12 and 5.4.2 is vulnerable to an argument injection vulnerability. This module takes advantage of the -d flag to set php.ini directives to achieve code execution. From the advisory: "if there is NO unescaped '=' in t

CVSS scores for CVE-2012-1823

Base Score Base Severity CVSS Vector Exploitability Score Impact Score Score Source First Seen
7.5
HIGH AV:N/AC:L/Au:N/C:P/I:P/A:P
10.0
6.4
NIST

CWE ids for CVE-2012-1823

  • The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
    Assigned by: nvd@nist.gov (Primary)

References for CVE-2012-1823

Products affected by CVE-2012-1823

This web site uses cookies for managing your session, storing preferences, website analytics and additional purposes described in our privacy policy.
By using this web site you are agreeing to CVEdetails.com terms of use!