CVE-2024-4577< Improper Input Validation
NVD
Vulnerability Summary
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.
Affected & Patched Versions
- < 8.3.8
- < 8.2.20
- < 8.1.29
- 8.3.8
- 8.2.20
- 8.1.29
What to do
Patch now. CISA lists this flaw as exploited in the wild and set a federal remediation deadline of Jul 3, 2024.
- Check whether you run < and which version.
- Update to a patched version listed above, then confirm the new version.
- Review logs and exposed services for signs of earlier compromise.
CISA required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
CISA KEV Status
Listed in Known Exploited Vulnerabilities
Added: Jun 12, 2024
Remediation due: Jul 3, 2024 (deadline passed)
Known use in ransomware campaigns: Yes
Remediation due: Jul 3, 2024 (deadline passed)
Known use in ransomware campaigns: Yes
Timeline
- Jun 9, 2024Published
- Jun 12, 2024Added to CISA KEV catalog
- Jul 3, 2024KEV remediation due date
- Oct 21, 2025Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new < CVEsYou are reading CVE-2024-4577. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsRelated Coverage
- Unseen Msupedge Malware Exploits PHP Flaw CVE-2024-4577 in Taiwanese University Cyberattack
- Hackers are actively exploiting PHP RCE vulnerability (CVE-2024-4577)
- PHP Vulnerability (CVE-2024-4577) Actively Exploited in TellYouThePass Ransomware Attacks
- Researchers Detail Critical PHP Flaw CVE-2024-4577 with PoC Exploit Code
- CVE-2024-4577: Critical PHP Vulnerability Exposes Millions of Servers to RCE
More < CVEs
External References
- Vendor Advisoryhttps://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- Referencehttps://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- Referencehttps://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/
- Vendor Advisoryhttps://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/
- Referencehttps://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/
- Referencehttps://github.com/11whoami99/CVE-2024-4577
- Referencehttps://github.com/xcanwin/CVE-2024-4577-PHP-RCE
- Patchhttps://github.com/rapid7/metasploit-framework/pull/19247
- Referencehttps://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
- Referencehttps://github.com/watchtowrlabs/CVE-2024-4577
- Referencehttps://www.php.net/ChangeLog-8.php#8.1.29
- Referencehttps://www.php.net/ChangeLog-8.php#8.2.20
- Referencehttps://www.php.net/ChangeLog-8.php#8.3.8
- Vendor Advisoryhttps://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
- Referencehttps://isc.sans.edu/diary/30994
- Advisoryhttp://www.openwall.com/lists/oss-security/2024/06/07/1
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
- Vendor Advisoryhttps://security.netapp.com/advisory/ntap-20240621-0008/
Data last checked: Nov 22, 2026 17:11 UTC