Critical severity · published Jun 9, 2024
CVE-2024-4577
Argument Injection in PHP-CGI
RansomwareIn wildKEV
9.8
CVSS
100%
EPSS
Yes
On KEV
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 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)100.0% · higher than 100% of CVEs
Exploited in the wildYes
CISA KEVListed Jun 12, 2024
Federal remediation dueJul 3, 2024
Ransomware campaign useKnown
Affected products
Which versions
PH
PHP · PHP
8.1.* before 8.1.29; 8.2.* before 8.2.20; 8.3.* before 8.3.8 · source: vendor, NVD, CISA, KEV
FE
Fedora · Fedoraproject
39; 40 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-4577
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-4577
CISA KEV catalogue
https://www.cisa.gov/known-exploited-vulnerabilities-catalog
github.com
https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
blog.orange.tw
https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
devco.re
https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/
arstechnica.com
https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/
www.imperva.com
https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/
github.com
https://github.com/11whoami99/CVE-2024-4577
More from PHP
9.8
CVE-2026-109618
RCE via OOM corruption
9.8
CVE-2019-11043
Underflow in PHP-FPM can lead to RCE
9.8
CVE-2016-10033
The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute…
9.8
CVE-2012-1823
PHP-CGI Query String Parameter Vulnerability
8.1
CVE-2026-109619
RCE via stale global state
