Vulnerability Details : CVE-2024-4577
Public exploit exists!
Used for ransomware!
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.
Products affected by CVE-2024-4577
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*
CVE-2024-4577 is in the CISA Known Exploited Vulnerabilities Catalog
This issue is known to have been leveraged as part of a ransomware campaign.
CISA vulnerability name:
PHP-CGI OS Command Injection Vulnerability
CISA required action:
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
CISA description:
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.
Notes:
This vulnerability affects a common open-source component, third-party library, or a protocol used by different products. Please check with specific vendors for information on patching status. For more information, please see: https://www.php.net/ChangeLog-8.php#; https://nvd.nist.gov/vuln/detail
Added on
2024-06-12
Action due date
2024-07-03
Exploit prediction scoring system (EPSS) score for CVE-2024-4577
94.38%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 100 %
Percentile, the proportion of vulnerabilities that are scored at or less
Metasploit modules for CVE-2024-4577
-
PHP CGI Argument Injection Remote Code Execution
Disclosure Date: 2024-06-06First seen: 2024-06-19exploit/windows/http/php_cgi_arg_injection_rce_cve_2024_4577This module exploits a PHP CGI argument injection vulnerability affecting PHP in certain configurations on a Windows target. A vulnerable configuration is locale dependant (such as Chinese or Japanese), such that the Unicode best-fit conversion scheme will unexpectedly
CVSS scores for CVE-2024-4577
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
9.8
|
CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
N/A
|
N/A
|
PHP Group | 2024-06-09 |
9.8
|
CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
3.9
|
5.9
|
NIST | 2024-06-10 |
9.8
|
CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
3.9
|
5.9
|
PHP Group | 2024-06-09 |
CWE ids for CVE-2024-4577
-
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.Assigned by:
- dd77f84a-d19a-4638-8c3d-a322d820ed2b (Primary)
- nvd@nist.gov (Primary)
- security@php.net (Secondary)
References for CVE-2024-4577
-
https://blog.talosintelligence.com/new-persistent-attacks-japan/
Unmasking the new persistent attacks on JapanExploit;Third Party Advisory
-
https://www.php.net/ChangeLog-8.php#8.3.8
PHP: PHP 8 ChangeLogRelease Notes
-
https://github.com/11whoami99/CVE-2024-4577
GitHub - 11whoami99/CVE-2024-4577: POC & $BASH script for CVE-2024-4577Exploit
-
http://www.openwall.com/lists/oss-security/2024/06/07/1
oss-security - PHP security releases 8.3.8, 8.2.20, and 8.1.29Mailing List;Third Party Advisory
-
https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
No Way, PHP Strikes Again! (CVE-2024-4577)Exploit;Third Party Advisory
-
https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
Page not found · GitHub · GitHubBroken Link;Exploit;Third Party Advisory
-
https://github.com/watchtowrlabs/CVE-2024-4577
GitHub - watchtowrlabs/CVE-2024-4577: PHP CGI Argument Injection (CVE-2024-4577) Remote Code Execution PoCExploit;Third Party Advisory
-
https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/
Imperva Protects Against Critical PHP Vulnerability CVE-2024-4577 | ImpervaThird Party Advisory
-
https://www.php.net/ChangeLog-8.php#8.1.29
PHP: PHP 8 ChangeLogRelease Notes
-
https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577
Exploit;Third Party Advisory
-
https://github.com/rapid7/metasploit-framework/pull/19247
Add exploit module for the new PHP CGI Argument Injection vuln (CVE-2024-4577) by sfewer-r7 · Pull Request #19247 · rapid7/metasploit-framework · GitHubExploit;Issue Tracking;Patch
-
https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
Orange: CVE-2024-4577 - Yet Another PHP RCE: Make PHP-CGI Argument Injection Great Again!Third Party Advisory
-
https://isc.sans.edu/diary/30994
Attacker Probing for New PHP Vulnerablity CVE-2024-4577 - SANS Internet Storm CenterExploit;Third Party Advisory
-
https://www.php.net/ChangeLog-8.php#8.2.20
PHP: PHP 8 ChangeLogRelease Notes
-
https://github.com/xcanwin/CVE-2024-4577-PHP-RCE
GitHub - xcanwin/CVE-2024-4577-PHP-RCE: 全球首款利用PHP默认环境的CVE-2024-4577 PHP-CGI RCE 漏洞 EXP,共享原创EXP,支持SSRF,支持绕过WAF。The world's first CVE-2024-4577 PHP-CGI RCE exploit utilizing the default PHP environment.Exploit;Third Party Advisory
-
https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/
Nasty bug with very simple exploit hits PHP just in time for the weekend | Ars TechnicaExploit;Press/Media Coverage;Third Party Advisory
-
https://security.netapp.com/advisory/ntap-20240621-0008/
CVE-2024-4577 PHP Vulnerability in NetApp Products | NetApp Product SecurityThird Party Advisory
-
https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577
Exploit;Third Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
[SECURITY] Fedora 39 Update: php-8.2.20-1.fc39 - package-announce - Fedora Mailing-ListsMailing List
-
https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
Warning: PHP Remote Code Execution, Patch Immediately! | CertThird Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
[SECURITY] Fedora 40 Update: php-8.3.8-1.fc40 - package-announce - Fedora Mailing-ListsMailing List
-
https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/
Security Alert: CVE-2024-4577 - PHP CGI Argument Injection Vulnerability | DEVCOREExploit;Third Party Advisory
Jump to