CVE-2024-4577: Vulnerability in PHP
Actively exploited. 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,...
Exploited in the wild, Used by ransomware, CWE-78
- Exploitation
- Confirmed 12 Jun 2024
- Severity
- 9.8 of 10
- Attack likelihood
- 94.8 % in 30 days
- Fix
- Fixed version known
- Patch deadline
- Agencies by 3 Jul 2024
Details
- EU ID
- EUVD-2024-44188
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weakness
- CWE-78
- Published
- 9 Jun 2024
- Last change
- 17 Jun 2026
- Likelihood rank
- Higher than 100 % of all rated vulnerabilities
- Recommended action
- PHP, specifically Windows-based PHP used in CGI mode, contains an OS command injection vulnerability that allows for arbitrary code execution. This vulnerability is a patch bypass for CVE-2012-1823.
Affected products
Affected versions and the first fixed release
- PHP From 8.1.0 before 8.1.29; From 8.2.0 before 8.2.20; From 8.3.0 before 8.3.8. Fixed in 8.1.29, 8.2.20, 8.3.8
- Fedoraproject Fedora Versions 39, 40. No fixed version recorded
Advisories
Vendor and security advisories
- openwall.com/lists/oss-security/2024/06/07/1
- arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-co...
- blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulner...
- github.com/11whoami99/CVE-2024-4577
- github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- github.com/watchtowrlabs/CVE-2024-4577
- github.com/xcanwin/CVE-2024-4577-PHP-RCE
- isc.sans.edu/diary/30994
- labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/...
Patches and fixes
Updates, commits and release notes
- github.com/rapid7/metasploit-framework/pull/19247
- php.net/ChangeLog-8.php
- php.net/ChangeLog-8.php
- php.net/ChangeLog-8.php
Related
- PHP vulnerabilities Recent advisories, watch this product
- Exploited vulnerabilities Explorer, exploited only