CVE-2024-4577

Known Exploited Public Exploit
Argument Injection in PHP-CGI

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.

Category

9.8
CVSS
Severity: Critical
CVSS 3.1 •
EPSS 94.38% Top 5%
KEV Since 
Third-Party Advisory openwall.com Third-Party Advisory arstechnica.com Third-Party Advisory orange.tw Third-Party Advisory cert.be Third-Party Advisory devco.re Third-Party Advisory github.com Third-Party Advisory github.com Third-Party Advisory github.com Third-Party Advisory sans.edu Third-Party Advisory watchtowr.com Third-Party Advisory netapp.com Third-Party Advisory imperva.com Third-Party Advisory talosintelligence.com Third-Party Advisory vicarius.io Third-Party Advisory vicarius.io
Affected: PHP Group PHP
Published at:
Updated at:

References

Link Tags
https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv broken link third party advisory exploit
https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html third party advisory
https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/ third party advisory exploit
https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/ press/media coverage third party advisory exploit
https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/ third party advisory
https://github.com/11whoami99/CVE-2024-4577 exploit
https://github.com/xcanwin/CVE-2024-4577-PHP-RCE third party advisory exploit
https://github.com/rapid7/metasploit-framework/pull/19247 patch issue tracking exploit
https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/ third party advisory exploit
https://github.com/watchtowrlabs/CVE-2024-4577 third party advisory exploit
https://www.php.net/ChangeLog-8.php#8.1.29 release notes
https://www.php.net/ChangeLog-8.php#8.2.20 release notes
https://www.php.net/ChangeLog-8.php#8.3.8 release notes
https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately third party advisory
https://isc.sans.edu/diary/30994 third party advisory exploit
http://www.openwall.com/lists/oss-security/2024/06/07/1 third party advisory mailing list
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ mailing list
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ mailing list
https://security.netapp.com/advisory/ntap-20240621-0008/ third party advisory
https://blog.talosintelligence.com/new-persistent-attacks-japan/ exploit third party advisory
https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577 exploit third party advisory
https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577 exploit third party advisory

Frequently Asked Questions

What is the severity of CVE-2024-4577?
CVE-2024-4577 has been scored as a critical severity vulnerability.
How to fix CVE-2024-4577?
To fix CVE-2024-4577, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-4577 being actively exploited in the wild?
It is confirmed that CVE-2024-4577 is actively exploited. Be extra cautious if you are using vulnerable components. According to its EPSS score, there is a ~94% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-4577?
CVE-2024-4577 affects PHP Group PHP.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.