CVE-2024-4577
PHP-CGI OS Command Injection Vulnerability
This vulnerability is in the CISA Known Exploited Vulnerabilities catalog: attackers are using it. If you run PHP, fix it now.
CISA required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
US federal civilian agencies must remediate by Jul 3, 2024.
Patch status
Official fix available since
Apply the vendor's update to every affected system. Check the fixed-in versions below where known.
Basis: NVD patch reference
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.
Source: NIST National Vulnerability Database. Official vulnerability data, reproduced as published.
Affected products
| Product | Vendor | Affected versions | Fixed in | Source |
|---|---|---|---|---|
| PHP | PHP Group | — | — | KEV |
| PHP | PHP | >= 8.1.0, < 8.1.29; >= 8.2.0, < 8.2.20; >= 8.3.0, < 8.3.8 | 8.1.29; 8.2.20; 8.3.8 | NVD |
Sources: KEV = CISA Known Exploited Vulnerabilities catalog; NVD = NIST National Vulnerability Database.
Intelligence timeline
Developments from the last 30 days, newest first.
- CVSS scoredUpdateKEV
CVE-2024-4577 scored CVSS 9.8: PHP Group PHP, PHP-CGI OS Command Injection Vulnerability
CISA lists this as exploited in the wild and known to be used in ransomware campaigns. Unpatched PHP systems are exposed to active attacks now.
Basis: NIST National Vulnerability Database
- Patch releasedUpdateKEV
Patch released for CVE-2024-4577: PHP Group PHP, PHP-CGI OS Command Injection Vulnerability
An official fix is now available for PHP Group PHP. This vulnerability is being exploited, so apply it promptly.
Basis: NVD patch reference
1 earlier event is available with a subscription. See plans.
Coverage
We have not published a story about this vulnerability yet.
References
- php.net
- nvd.nist.gov
- openwall.com
- arstechnica.com
- blog.orange.tw
- cert.be
- devco.re
- github.com
- github.com
- github.com
- github.com
- github.com
- isc.sans.edu
- labs.watchtowr.com
- lists.fedoraproject.org
- lists.fedoraproject.org
- security.netapp.com
- imperva.com
- php.net
- php.net
- php.net
- blog.talosintelligence.com
- vicarius.io
- vicarius.io
- cisa.gov
