patchminder
Exploited in the wild · CISA KEV Used by ransomware CVE-2024-4577

Command injectionin PHP.

Published 9 Jun 2024 · Updated 21 Oct 2025 · Every fact sourced

JSONCite
Is it exploited?
Yes

On CISAThe US cyber defence agency. Its list names every hole it has seen used in real attacks.'s exploited list since 12 Jun 2024. Ransomware groups use it too.

On CISA's listKnown ransomware useAttack code is public
Severity
Critical 9.8
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1 · no login needed
Attack likelihood
Very high
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 100.0% chance in 30 days · 4 Dec 2026
Fix
Available
Fixed in 8.1.29, 8.2.20, 8.3.8
In plain words

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.

CISA: 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.

What to do now
  • Upgrade PHP to 8.1.29, 8.2.20, 8.3.8 or later, whichever matches your release line.
  • CISA requires US federal agencies to fix it by 3 Jul 2024.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
PHP
before 8.1.29
8.1.29
CVE record
PHP
before 8.2.20
8.2.20
CVE record
PHP
before 8.3.8
8.3.8
CVE record

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 6 May 2024
    CVE ID reserved by php.
  2. 6 Jun 2024
    Metasploit module: PHP CGI Argument Injection Remote Code Execution.
  3. 7 Jun 2024
    First public proof of concept on GitHub.
  4. 9 Jun 2024
    Published in the CVE List.
  5. 12 Jun 2024
    Added to CISA's Known Exploited Vulnerabilities list.
  6. 12 Jun 2024
    CISA lists known use in ransomware campaigns.
  7. 21 Oct 2025
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Exploited in the wild (CISA KEV). CISA assessment (SSVC): exploitation active.

Metasploit module
1 module
Nuclei scan template
Available
Exploit-DB
2 entries
GitHub proof of concepts
76 repositories
NucleiPHP CGI · Argument Injectiondetection template
Exploit-DBEDB-ID 52047web application exploit for php, published 14 Jun 2024
Exploit-DBEDB-ID 52331web application exploit for php, published 15 Jun 2025
GitHubno warning signs foundwatchtowrlabs/CVE-2024-4577327 stars · created 7 Jun 2024PHP CGI Argument Injection (CVE-2024-4577) Remote Code Execution PoC
GitHubno warning signs foundxcanwin/CVE-2024-4577-PHP-RCE162 stars · created 8 Jun 2024[漏洞复现] 全球首款利用PHP默认环境(XAMPP)的CVE-2024-4577 PHP-CGI RCE 漏洞 EXP。
GitHubno warning signs foundTAM-K592/CVE-2024-457775 stars · created 7 Jun 2024CVE-2024-4577 is a critical vulnerability in PHP affecting CGI configurations, allowing attackers to execute arbitrary commands via crafted URL parameters.
GitHubno warning signs foundNight-have-dreams/php-cgi-Injector52 stars · created 15 Mar 2025一個測試CVE-2024-4577和CVE-2024-8926的安全滲透工具
GitHubno warning signs found11whoami99/CVE-2024-457743 stars · created 7 Jun 2024POC & $BASH script for CVE-2024-4577
GitHubno warning signs foundChocapikk/CVE-2024-457735 stars · created 9 Jun 2024PHP CGI Argument Injection vulnerability
GitHubno warning signs foundZephrFish/CVE-2024-4577-PHP-RCE33 stars · created 8 Jun 2024PHP RCE PoC for CVE-2024-4577 written in bash, go, python and a nuclei template
GitHubno warning signs foundgh-ost00/CVE-2024-4577-RCE26 stars · created 20 Aug 2024PHP CGI Argument Injection (CVE-2024-4577) RCE
GitHubno warning signs foundBTtea/CVE-2024-4577-RCE-PoC25 stars · created 6 Nov 2024CVE-2024-4577 RCE PoC
GitHubno warning signs foundhuseyinstif/CVE-2024-4577-Nuclei-Template21 stars · created 7 Jun 2024

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other PHP vulnerabilities

Same weakness: OS command injection

All CWE-78 vulnerabilities

References
Cite this page

Patchminder. CVE-2024-4577: Command injection in PHP. https://patchminder.com/cve/cve-2024-4577/ (accessed 5 December 2026).