CVE-2024-4577
PHP-CGI OS Command Injection Vulnerability
PHP Group PHP
In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use "Best-Fit" behavior to replace characters in command line given to Win32 API functions. PHP CGI module may misinterpret those characters as PHP options, which may allow a malicious user to pass options to PHP binary being run, and thus reveal the source code of scripts, run arbitrary PHP code on the server, etc.
Exploitation status
CISA Known Exploited Vulnerabilities
Listed by CISA on 12 June 2024. US federal agencies were required to remediate it by 3 July 2024. CISA records this vulnerability as known to be used in ransomware campaigns.
EPSS — exploitation probability
FIRST puts the probability of exploitation activity in the next 30 days at 100%, which is higher than 99.9% of all scored vulnerabilities. EPSS is a forecast of activity, not a measure of severity, and it is rescored daily.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Frequently asked questions
Is CVE-2024-4577 being exploited by ransomware groups?
No ransomware group in this database is currently recorded as exploiting CVE-2024-4577.
What does CVE-2024-4577 affect?
CVE-2024-4577 affects PHP Group PHP. In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use "Best-Fit" behavior to replace characters in command line given to Win32 API functions. PHP CGI module may misinterpret those characters as PHP options, which may allow a malicious user to pass options to PHP binary being run, and thus reveal the source code of scripts, run arbitrary PHP code on the server, etc.
How severe is CVE-2024-4577?
CVE-2024-4577 is rated CRITICAL with a CVSS base score of 9.8. EPSS puts the probability of exploitation in the next 30 days at 100%, higher than 99.9% of all scored vulnerabilities. It is listed in the CISA Known Exploited Vulnerabilities catalog, with a federal remediation deadline of 3 July 2024.
How should organisations respond to CVE-2024-4577?
Apply the vendor patch for PHP Group PHP as the first priority, and treat any internet-facing instance as the most urgent. Because this vulnerability is associated with ransomware activity, also review whether the affected systems were reachable before patching, rather than assuming that patching alone closes the incident.