Exploited vulnerabilities · PHP Group
CVE-2024-4577
PHP-CGI OS Command Injection Vulnerability
PHP, specifically Windows-based PHP used in CGI mode, contains an OS command injection vulnerability that allows for arbitrary code execution. This vulnerability is a patch bypass for CVE-2012-1823.
Description in the NVD
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.
Required action according to CISA
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
What to do now
- Check your exposureFind out whether PHP Group PHP runs anywhere in your environment, including systems of suppliers.
- Patch or mitigateApply the vendor update. If that is not possible at once, use the vendor's mitigation or take the system off the network.
- Look for signs of an attackThis vulnerability is exploited in real attacks. Review the logs of affected systems for the time before the patch.
References
- arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-
- blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerabi
- github.com/11whoami99/CVE-2024-4577
- github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- github.com/rapid7/metasploit-framework/pull/19247
- github.com/watchtowrlabs/CVE-2024-4577
- nvd.nist.gov/vuln/detail/CVE-2024-4577
More exploited vulnerabilities in PHP Group products
Data: CISA Known Exploited Vulnerabilities Catalog and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.