PT-2024-4006

CVE-2024-4577

·

Published

2023-12-19

·

Updated

2026-10-28

Description by

CVSS 3.1
9.8
Critical
MetricsAV: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 An OS command injection flaw exists in the PHP CGI module on Windows when used with Apache. The issue arises because the Windows implementation of PHP does not account for Best-Fit behavior, where Unicode characters are converted to the closest matching ANSI characters. A remote attacker can send a specially crafted HTTP request containing specific character sequences that the php-cgi module misinterprets as PHP options. This allows the attacker to pass arbitrary options to the PHP binary, potentially revealing script source code or executing arbitrary PHP code on the server. Real-world exploitation has been observed globally, including a massive breach at the Japanese hosting provider Onamae affecting approximately 26,000 servers, as well as attacks in the US, UK, Singapore, Indonesia, Taiwan, Hong Kong, India, Spain, and Malaysia. Attackers have used this flaw to deploy Quasar RAT, XMRig cryptocurrency miners, and Cobalt Strike TaoWu plugins to gain system privileges and maintain persistence.
Recommendations Update PHP to version 8.1.29. Update PHP to version 8.2.20. Update PHP to version 8.3.8. As a temporary mitigation, disable the session.upload progress setting in the php.ini file. Disable the expose php directive and restrict the disable functions list in php.ini to harden the server against host takeover.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-3QGC-JRRR-25JV
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
AZL-42424
AZL-42433
BIT-LIBPHP-2024-4577
BIT-PHP-2024-4577
BIT-PHP-MIN-2024-4577
OPENSUSE-SU-2024:14376-1
Found an issue in the description? Have something to add? Feel free to write us 👾