SUBJECT: CVE-2024-4577 PHP-CGI Argument Injection Vulnerability
TECH STACK: PHP versions 8.1., 8.2., and 8.3.* on Windows with Apache and PHP-CGI
DATE(S) ISSUED: 06/07/2024
CRITICALITY: HIGH
OVERVIEW:
CVE-2024-4577 is a severe argument injection vulnerability in PHP that can be exploited for Remote Code Execution (RCE). This flaw stems from errors in character encoding conversions, particularly the "Best-Fit" feature on Windows systems using Apache and PHP-CGI. Unauthenticated attackers can exploit this vulnerability by manipulating URL parameters to execute arbitrary code on the affected system.
THREAT INTELLIGENCE:
This vulnerability has been actively exploited to deploy ransomware such as TellYouThePass, making it a significant threat. It affects all PHP versions for Windows prior to 8.1.29, 8.2.20, and 8.3.8. The Shadowserver Foundation has reported multiple IP addresses scanning for vulnerable servers.
SOLUTION:
Steps to Mitigate:
Upgrade PHP:
Apply Temporary Mitigations (if upgrade is not immediately possible):
RewriteEngine On
RewriteCond %{QUERY_STRING} ^%ad [NC]
RewriteRule .? - [F,L]
C:/xampp/apache/conf/extra/httpd-xampp.conf
):
# ScriptAlias /php-cgi/ "C:/xampp/php/"
Verify Configuration:
Consider Migration to More Secure Architectures:
REFERENCES: