CVE-2024-4577
CVE-2024-4577 is a critical-severity vulnerability (CVSS 3.1 base score 9.8). PHP, specifically Windows-based PHP used in CGI mode, contains an OS command injection vulnerability that allows for arbitrary code execution. CISA added it to the Known Exploited Vulnerabilities catalog on 2024-06-12, with a remediation due date of 2024-07-03 for US federal civilian agencies. CISA lists known use in ransomware campaigns. As of 2026-11-22, EPSS estimates a 99.987% probability of exploitation in the next 30 days, in the 99th percentile of scored CVEs.
Updated
- CVSS 3.1
- 9.8 CRITICAL
- EPSS
- 99.987% (99th pct)
- CISA KEV
- Exploited
- Published
- 2024-06-09
- Weakness
- CWE-78
PHP-CGI OS Command Injection Vulnerability is confirmed as actively exploited and is listed in the CISA KEV catalog.
Required action
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
CISA notes
This vulnerability affects a common open-source component, third-party library, or a protocol used by different products. Please check with specific vendors for information on patching status. For more information, please see: https://www.php.net/ChangeLog-8.php#; https://nvd.nist.gov/vuln/detail/CVE-2024-4577
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.
Key Findings
as of 2026-11-22- CISA added CVE-2024-4577 to the KEV catalog 3 days after its CVE record was published. The median for entries added in 2024 is 21.5 days.
- It is one of 3 PHP Group entries in the CISA KEV catalog, and the only one added in 2024.
- Its current EPSS score (99.987%) is higher than that of 96% of CISA KEV entries.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator Remediation Timeline
BOD 26-04, US federal agenciesDeadlines for US federal civilian agencies under Table 1 of CISA BOD 26-04, from the CVE's KEV status (listed) and CISA's SSVC values (automatable yes, technical impact total, 2024-06-15).
How the timeline is set
Table 1 of CISA's Binding Operational Directive 26-04 sets the time US federal civilian agencies have to remediate a vulnerability. It depends on four inputs: whether the asset is publicly exposed, whether the CVE is in the KEV catalog, whether an adversary can automate its exploitation, and whether exploitation gives partial or total control of the asset, which SSVC calls technical impact. CISA publishes the last three for every CVE through services such as its Vulnrichment program.
Days are calendar days. The clock starts at whichever comes first: CISA adds the CVE to the KEV catalog, or the agency identifies the vulnerability on an asset and reports it to its Continuous Diagnostics and Mitigation (CDM) dashboard. A publicly exposed asset is accessible to unauthenticated or untrusted entities via public networks, such as the internet. Forensic triage means assessing the asset to determine whether it has been compromised.
CISA calculates the KEV due date with the same table, using its own evidence on whether the vulnerability is present in a publicly exposed asset. Each agency makes the final exposure decision for each of its assets.
Affected Products
| Vendor | Product | Affected versions |
|---|---|---|
| PHP Group | PHP Group PHP | 8.1.* to <8.1.29 8.2.* to <8.2.20 8.3.* to <8.3.8 |
References
22 linksOther references
- https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/
- https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/
- https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/
- https://github.com/11whoami99/CVE-2024-4577
- https://github.com/xcanwin/CVE-2024-4577-PHP-RCE
- https://github.com/rapid7/metasploit-framework/pull/19247
- https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
- https://github.com/watchtowrlabs/CVE-2024-4577
- https://www.php.net/ChangeLog-8.php#8.1.29
- https://www.php.net/ChangeLog-8.php#8.2.20
- https://www.php.net/ChangeLog-8.php#8.3.8
- https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
- https://isc.sans.edu/diary/30994
- http://www.openwall.com/lists/oss-security/2024/06/07/1
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
- https://security.netapp.com/advisory/ntap-20240621-0008/
- https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577
- https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577
- https://blog.talosintelligence.com/new-persistent-attacks-japan/
Record Details
- Published
- 2024-06-09
- Last updated
- 2025-10-21
- Assigner (CNA)
- php
- Credited to
- Orange Tsai, DEVCORE Research Team
More from PHP Group
RCE via OOM corruption
RCE via stale global state
Session serializer mismatch can lead to remote code execution
PHP-FPM request smuggling through an unread HTTP request body
CVE record data © The MITRE Corporation, used under the CVE Terms of Use. Exploited-in-the-wild data from the CISA Known Exploited Vulnerabilities catalog (CC0). Exploit prediction scores by FIRST EPSS (first.org/epss). Alert titles and links from CISA cybersecurity alerts. This site is not affiliated with or endorsed by MITRE, NVD, CISA, or FIRST.