PT-2024-4006 · Apache +5 · Apache +5
Orangetw
·
Published
2023-12-19
·
Updated
2026-02-13
·
CVE-2024-4577
CVSS v3.1
9.8
9.8
Critical
| Base vector | Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
PHP versions 8.1.0 through 8.1.28
PHP versions 8.2.0 through 8.2.19
PHP versions 8.3.0 through 8.3.7
Description
PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8, when used with Apache and PHP-CGI on Windows systems configured to use certain code pages, are vulnerable to a remote code execution (RCE) flaw (CVE-2024-4577). This vulnerability arises because the PHP CGI module may misinterpret characters as PHP options, allowing attackers to execute arbitrary code. Exploitation of this vulnerability has been observed in active attacks, including the deployment of ransomware (TellYouThePass) and cryptominers (XMRig, JuicyPotato). Attackers are also using this vulnerability for initial access and credential theft, particularly targeting organizations in Japan. The vulnerability is due to the way Windows handles character conversions, specifically the "Best-Fit" behavior. Publicly available exploits exist, and the vulnerability is being actively exploited in the wild.
Recommendations
Upgrade PHP to version 8.3.8 or later.
Upgrade PHP to version 8.2.20 or later.
Upgrade PHP to version 8.1.29 or later.
If upgrading is not immediately possible, consider disabling PHP-CGI or implementing a mod rewrite rule to mitigate the vulnerability.
Exploit
Fix
DoS
LPE
RCE
OS Command Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
dbugs@ptsecurity.com
Weakness Enumeration
Related Identifiers
ALSA-2023_7877
ALSA-2024_10949
ALSA-2024_10950
ALSA-2024_10951
ALSA-2024_10952
ALSA-2024_2447
ALSA-2025_15687
ALSA-2025_16880
ALSA-2025_4263
ALSA-2025_7432
ALT-PU-2024-13731
ALT-PU-2024-16480
ALT-PU-2024-8853
ALT-PU-2024-8859
ALT-PU-2024-8861
ALT-PU-2024-9191
ALT-PU-2024-9193
BDU:2024-04432
BIT-LIBPHP-2024-4577
BIT-PHP-2024-4577
BIT-PHP-MIN-2024-4577
CVE-2024-4577
GHSA-3QGC-JRRR-25JV
OPENSUSE-SU-2024:14376-1
Affected Products
Alt Linux
Apache
Cobalt Strike
Php
Red Os
Xampp
References · 642
- 🔥 https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/php_cgi_arg_injection_rce_cve_2024_4577.rb⭐ 37163 🔗 14685 · Exploit
- 🔥 https://github.com/rapid7/metasploit-framework/pull/19247⭐ 37163 🔗 14685 · Exploit
- 🔥 https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv⭐ 39625 🔗 7960 · Exploit
- 🔥 https://github.com/watchtowrlabs/CVE-2024-4577⭐ 303 🔗 64 · Exploit
- 🔥 https://github.com/xcanwin/CVE-2024-4577-PHP-RCE⭐ 159 🔗 35 · Exploit
- 🔥 https://github.com/TAM-K592/CVE-2024-4577⭐ 79 🔗 17 · Exploit
- 🔥 https://github.com/11whoami99/CVE-2024-4577⭐ 44 🔗 9 · Exploit
- 🔥 https://github.com/Chocapikk/CVE-2024-4577⭐ 30 🔗 12 · Exploit
- 🔥 https://github.com/ZephrFish/CVE-2024-4577-PHP-RCE⭐ 28 🔗 12 · Exploit
- 🔥 https://github.com/fa-rrel/CVE-2024-4577-RCE⭐ 24 🔗 4 · Exploit
- 🔥 https://github.com/gh-ost00/CVE-2024-4577-RCE⭐ 24 🔗 4 · Exploit
- 🔥 https://github.com/BTtea/CVE-2024-4577-RCE-PoC⭐ 25 🔗 2 · Exploit
- 🔥 https://github.com/huseyinstif/CVE-2024-4577-Nuclei-Template⭐ 21 🔗 2 · Exploit
- 🔥 https://github.com/gotr00t0day/CVE-2024-4577⭐ 12 🔗 2 · Exploit
- 🔥 https://github.com/K3ysTr0K3R/CVE-2024-4577-EXPLOIT⭐ 8 🔗 2 · Exploit