CVE-2012-1823: PHP-CGI Query String Parameter Vulnerability
Fixed bug GHSA-3qgc-jrrr-25jv (Bypass of CVE-2012-1823, Argument Injection in PHP-CGI). (CVE-2024-4577)
Other sources
sapi/cgi/cgimain.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 phpgetopt for the 'd' case.
sapi/cgi/cgimain.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.
— CISA
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 8.3.8 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 8.1.29 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 5.3.12 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 5.4.2 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Patch GHSA-3qgc-jrrr-25jv
Event History
Frequently Asked Questions
What is the severity of CVE-2012-1823?
CVE-2012-1823 is considered a medium severity vulnerability due to its potential to allow argument injection in PHP-CGI.
How do I fix CVE-2012-1823?
To fix CVE-2012-1823, upgrade PHP to version 5.3.12 or later, or 5.4.2 or later.
What versions of PHP are affected by CVE-2012-1823?
CVE-2012-1823 affects PHP versions 5.3.11 and earlier, as well as 5.4.1 and earlier.
How does CVE-2012-1823 impact PHP CGI configurations?
CVE-2012-1823 impacts PHP CGI configurations by allowing an attacker to bypass security measures through malformed query strings.
Is CVE-2012-1823 related to any other vulnerabilities?
CVE-2012-1823 has been linked to CVE-2024-4577, which addresses a bypass of the original issue.