CVE-2024-4577: PHP-CGI · Argument Injection
Affects phpSource GCVE Database
Exploited in the wild · used in ransomware campaigns · KEV due 3 Jul 2024 · public exploit available (Metasploit, Exploit-DB) · 99% EPSS · fixed in 8.3.8 : patch php now.
Data as of 26 Oct 2026, 10:12 UTC
- KEV deadline
- US federal agencies must patch by this date; a sensible deadline for everyone else.
- Ransomware
- Used in ransomware campaigns
- EPSS
- 99.9% chance of exploitation in 30 days – higher than 99% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 8.3.8, 8.2.20, 8.1.29
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
t = 0 is the CVE’s publication on cve.org
Disclosed: evidence found.
CVE published 9 Jun 2024
Detectable: evidence found.
Weaponised: evidence found.
1 Metasploit module · 1 Exploit-DB entry, 1 year after disclosure
Exploited in the wildExploited: evidence found.
Listed in CISA KEV 3 days after disclosure
Observed by OffSeq MirageSeen by Mirage: evidence found.
185 honeypot hits, first 2.4 years after disclosure
Timeline
CVE ID reserved
by PHP Group
, 34 days before disclosure
CVE published
on cve.org
, t = 0
Added to CISA KEV (opens in a new tab)
exploitation confirmed · ransomware use known
, 3 days after disclosure
KEV remediation due
US federal deadline
, 24 days after disclosure
First Exploit-DB entry (opens in a new tab)
PHP CGI Module 8.3.4 - Remote Code Execution (RCE)
, 1 year after disclosure
First seen by OffSeq Mirage
from 33 attacker networks; activity in United States, Germany, Netherlands, United Kingdom and 3 more
, 2.4 years after disclosure
Last seen by OffSeq Mirage (opens in a new tab)
25 Oct 2026, 21:45 UTC
, 2.4 years after disclosure
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CISA KEV (opens in a new tab), OffSeq Mirage (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade php to 8.3.8, 8.2.20 or 8.1.29.
Patches and advisories
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Bitnamiphppkg:bitnami/phpOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
A critical vulnerability (CVE-2024-4577) affects PHP-CGI on Windows when used with Apache and certain code pages. In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8, Windows may apply "Best-Fit" character replacement in command-line arguments, causing PHP-CGI to misinterpret these as PHP options. This can allow attackers to pass malicious options to the PHP binary, potentially exposing source code or enabling arbitrary code execution.
References
- openwall.com/lists/oss-security/2024/06/07/1 (opens in a new tab)
- arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/ (opens in a new tab)
- blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html (opens in a new tab)
- cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately (opens in a new tab)
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/ (opens in a new tab)
- github.com/11whoami99/CVE-2024-4577 (opens in a new tab)
- github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv (opens in a new tab)
- github.com/rapid7/metasploit-framework/pull/19247 (opens in a new tab)
- github.com/watchtowrlabs/CVE-2024-4577 (opens in a new tab)
- github.com/xcanwin/CVE-2024-4577-PHP-RCE (opens in a new tab)
- isc.sans.edu/diary/30994 (opens in a new tab)
- labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/ (opens in a new tab)
- imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/ (opens in a new tab)
- php.net/ChangeLog-8.php (opens in a new tab)
- php.net/ChangeLog-8.php (opens in a new tab)
- php.net/ChangeLog-8.php (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ (opens in a new tab)
- security.netapp.com/advisory/ntap-20240621-0008/ (opens in a new tab)
- vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577 (opens in a new tab)