CVE-2024-4577: PHP Group PHP (Critical, CVSS 9.8)

Remote Attacker
Detection content in our coverage: IOCs
CVE-2024-4577CriticalKEVPublic exploitPHP Group PHP
CVSS
9.8 Critical (v3.1)
EPSS
100% chance of exploitation in the next 30 days (higher than 99.9% of CVEs)
Exploited in the wild
Yes, on CISA’s KEV list since Jun 12, 2024; used by ransomware
Public exploit
Yes, reported in a Metasploit module, Exploit-DB, a Nuclei template and 76 GitHub repositories
Weakness
CWE-78
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
Jun 9, 2024
CISA fix-by date
Jul 3, 2024 (for US federal agencies)

What it is

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.

Description from the National Vulnerability Database.

What to do

CISA: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.

Check whether you run PHP Group PHP, then apply the vendor’s fix or mitigation from the advisories below. Because this flaw is exploited or has public exploit code, treat it as urgent and check for signs of compromise, not just the patch level.

Advisories and fixes

ThreatRoundup coverage

Sources: NVD, FIRST EPSS, CISA KEV, and public exploit databases (availability only). ThreatRoundup reports whether public exploit code exists but never links to it: fake proof-of-concepts that infect security researchers are common. This page updates automatically.