CVE-2024-4577
PHP Group PHP: PHP-CGI OS Command Injection
As of , CVE-2024-4577 in PHP Group PHP is on CISA's list of exploited vulnerabilities: CISA listed it on . Our patch-first group: Patch this week.
- Exploited
- Yes: CISA listed it on 12 June 2024
- US federal deadline
- 3 July 202421 days after CISA listed it. US federal civilian agencies must fix it by then.
- Used in ransomware campaigns
- Known
- EPSS score
- 0.99Higher than 99% of the CVEs EPSS scores. EPSS estimates the chance of exploitation activity in the next 30 days.
- EPSS when listed
- 0.28 on 12 June 2024EPSS on the day CISA listed it.
- Public exploit
- 1 Metasploit module and 1 Exploit-DB entry
- Fix
- Vendor advice: www.php.netLinks below, from CISA's entry.
What CISA says to do
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
CISA's required action
- www.php.netThis vulnerability affects a common open-source component, third-party library, or a protocol used by different products. Please check…
What the flaw is
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.
CISA's 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.
The CVE record's description, from php
- CVE published
- 9 June 2024
- Assigned by
- php
- CVSS
- 9.8 Critical (CVSS 3.1, from the CNA)
- CWE-78
- Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
- CISA SSVC, exploitation
- active
- CISA SSVC, automatable
- yes
- CISA SSVC, technical impact
- total
Timeline
- The CVE record was published.
- CISA added it to its list of exploited vulnerabilities.
- The US federal deadline to fix it.
- Exploit-DB published an exploit (EDB-ID 52331).
Public exploits
Facts from Metasploit's module list and Exploit-DB's index; we never copy exploit code.
- Metasploit: PHP CGI Argument Injection Remote Code Executionexploit module, rank excellent
- Exploit-DB: PHP CGI Module 8.3.4 - Remote Code Execution (RCE)EDB-ID 52331, 15 June 2025
Read further
- CVE recordcve.org
- NVD entrynvd.nist.gov
- CISA's catalogcisa.gov
- EPSS for this CVEapi.first.org