CVE-2024-4577
PHP-CGI OS Command Injection
- Published9 Jun 2024
- Added to CISA KEV12 Jun 2024
- Remediation due3 Jul 2024
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.
CVSS 3.1 breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HAffected products
Remediation
References
- https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/
- https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- https://blog.talosintelligence.com/new-persistent-attacks-japan/
- https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
- https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/
- https://github.com/11whoami99/CVE-2024-4577
- https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- https://github.com/rapid7/metasploit-framework/pull/19247
- https://github.com/watchtowrlabs/CVE-2024-4577
- https://github.com/xcanwin/CVE-2024-4577-PHP-RCE
and 13 more references
Related CVEs
Recent high-severity vulnerabilities sharing a weakness type.
Frequently asked
Is CVE-2024-4577 being actively exploited?
Yes. CVE-2024-4577 is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added 12 Jun 2024. It has been used in ransomware campaigns.
How severe is CVE-2024-4577?
CVE-2024-4577 has a CVSS 3.1 base score of 9.8, rated critical. EPSS estimates a 100.0% probability of exploitation.
Which products are affected by CVE-2024-4577?
Affected products include PHP, Fedoraproject Fedora.
How do I fix CVE-2024-4577?
Upgrade affected software to a fixed version, for example PHP 8.1.29 or later, then confirm no affected versions remain in your inventory.
How Secuno handles this
Secuno correlates vulnerabilities like CVE-2024-4577 against the real software inventory on every managed device, every day. Rather than a static severity, each match is scored in context: exploit availability, EPSS, the asset's exposure, and business criticality decide where it lands in the queue. Because it is on the CISA KEV list, Secuno flags any affected asset as top-priority automatically. If an affected version is present anywhere across your portfolio, it surfaces automatically with a prioritised remediation path.
Data from the NVD, CISA KEV catalog and FIRST EPSS. CVSS 3.1 base score shown where available.