问题所在
在 CGI 模式下运行的 Windows 版 PHP 存在 OS 命令注入漏洞。攻击者可利用此漏洞在服务器上执行任意代码。
影响范围
该漏洞影响在 CGI 模式下运行的 Windows 版 PHP 安装,具体版本范围为 8.1.0 至 8.1.29 之前、8.2.0 至 8.2.20 之前,以及 8.3.0 至 8.3.8 之前。
应对措施
将 PHP 升级至修复版本 8.1.29、8.2.20 或 8.3.8。如果无法立即应用更新,请遵循厂商的缓解措施说明或停止使用该产品。
原始描述
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.
已知被利用(CISA KEV)
- 加入 KEV 日期
- 2024-06-12
- 修复期限(美国联邦机构)
- 2024-07-03
- 用于勒索软件
- Known
- 要求采取的措施
- Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
受影响的软件
- 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 精确匹配
详情
- 发布日期
- 2024-06-10
- 最后修改
- 2025-10-22
- CVSS 向量
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- CWE
- CWE-78
- EPSS(30 天内被利用概率)
- 99.99% (百分位 100)
参考资料
- cve.org/CVE-2024-4577
- nvd.nist.gov/vuln/detail/CVE-2024-4577
- github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerabi...
- arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-...
- www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/
- github.com/11whoami99/CVE-2024-4577
- github.com/xcanwin/CVE-2024-4577-PHP-RCE
- github.com/rapid7/metasploit-framework/pull/19247
- labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
- github.com/watchtowrlabs/CVE-2024-4577
- www.php.net/ChangeLog-8.php#8.1.29
- www.php.net/ChangeLog-8.php#8.2.20
本产品使用 NVD API 的数据,但未获得 NVD 的认可或认证。CVE® 是 The MITRE Corporation 的注册商标;CVE 记录依据 CVE Program 使用条款使用。