CVE-2024-4577
9.8, critical Known exploited Used in ransomwarePHP-CGI OS Command Injection Vulnerability
- CVSS
- 9.8, critical critical CVSS v3.1
- EPSS, next 30 days
- 100% higher than 99.9% of scored CVEs
- Exploitation
- Confirmed in the wild
- Published
- 9 Jun 20242 years ago
Known exploited
CISA added this to the Known Exploited Vulnerabilities Catalog on 12 Jun 2024 and links it to ransomware activity. US federal agencies had to remediate by 3 Jul 2024, a deadline that has passed.
Required action. Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
Description
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.
Details
- Vendor
- PHP Group and 1 more
- Product
- PHP
- Weakness
- CWE-78 (opens in a new tab)
- Status
- Analyzed
- Updated
- 17 Jun 2026
- Assigner
- security@php.net
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References 23
Exploit code 12
- arstechnica.com /security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/ (opens in a new tab)
- blog.talosintelligence.com /new-persistent-attacks-japan/ (opens in a new tab)
- devco.re /blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/ (opens in a new tab)
- github.com /11whoami99/CVE-2024-4577 (opens in a new tab)
- github.com /php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv (opens in a new tab)
- github.com /rapid7/metasploit-framework/pull/19247 (opens in a new tab)
- github.com /watchtowrlabs/CVE-2024-4577 (opens in a new tab)
- github.com /xcanwin/CVE-2024-4577-PHP-RCE (opens in a new tab)
4 more
- isc.sans.edu /diary/30994 (opens in a new tab)
- labs.watchtowr.com /no-way-php-strikes-again-cve-2024-4577/ (opens in a new tab)
- vicarius.io /vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577 (opens in a new tab)
- vicarius.io /vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577 (opens in a new tab)
Patches and fixes 1
Advisories 4
- openwall.com /lists/oss-security/2024/06/07/1 (opens in a new tab)
- blog.orange.tw /2024/06/cve-2024-4577-yet-another-php-rce.html (opens in a new tab)
- security.netapp.com /advisory/ntap-20240621-0008/ (opens in a new tab)
- imperva.com /blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/ (opens in a new tab)
Other references 6
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ (opens in a new tab)
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ (opens in a new tab)
- cisa.gov /known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-4577 (opens in a new tab)
- php.net /ChangeLog-8.php#8.1.29 (opens in a new tab)
- php.net /ChangeLog-8.php#8.2.20 (opens in a new tab)
- php.net /ChangeLog-8.php#8.3.8 (opens in a new tab)
The kind is read from NVD's tags where present and from the shape of the URL otherwise, so treat it as a hint.
Beyond this page
Is CVE-2024-4577 in your network?
This page tells you how dangerous CVE-2024-4577 is out there. Whether it sits on one of your devices, only a scan of your own network can tell. That is what our systems do, every day, for the companies we protect.
CVE-2024-4577 is in the CISA catalogue of exploited vulnerabilities: attackers are already exploiting it.
-
EXYS7600 OCELOT
Find it before attackers do
Ocelot scans your network on a schedule and reports every vulnerability it finds by its CVE identifier, with its CVSS score and how many of your hosts are affected. A finding like CVE-2024-4577 comes with the devices to patch.
Learn more about EXYS7600 OCELOT -
EXYS7950 KONDRA
Detect it if it's exploited
Until the patch is applied, Kondra monitors your network, events and endpoints in real time. It keeps an inventory of the software installed on every endpoint, and its anomaly detection rules flag what an attacker does once inside.
Learn more about EXYS7950 KONDRA
Assembled from the NVD 2.0 API, the CISA Known Exploited Vulnerabilities Catalog and FIRST EPSS. Scores are as of our last collection on 17 Oct 2026, not the live upstream state.