CVE-2024-4577: PHP-CGI Argument Injection on Windows
- Vendors
- Fedora ProjectPHP Group
CVE-2024-4577 is an argument-injection vulnerability in PHP-CGI running with Apache on Windows under certain code-page configurations. Windows “Best-Fit” character conversion can transform attacker-controlled characters in command lines passed to Win32 API functions into characters that PHP-CGI interprets as command-line options. Unauthenticated remote attackers can submit specially crafted URL query arguments to inject PHP options, potentially disclosing script source code or executing arbitrary PHP code. Affected releases include PHP 8.1.x before 8.1.29, 8.2.x before 8.2.20, and 8.3.x before 8.3.8; unsupported older branches may also be affected. The vulnerability has been exploited in the wild, including in ransomware campaigns, and is listed in CISA’s Known Exploited Vulnerabilities catalog.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can compromise application confidentiality, integrity, and availability through script source-code disclosure and arbitrary code execution in the affected service account’s security context. Attackers may read application secrets, modify or delete accessible data, and install malware. Broader system compromise depends on the service account’s privileges and access.
Mitigation
If you can’t patch tonight, do this now.
Until patched, restrict public access to PHP-CGI endpoints or disable the vulnerable CGI integration where feasible. Consider migrating to an alternative PHP integration not exposed to this CGI argument-injection mechanism. Run web services with least privilege and disable unnecessary services to limit post-exploitation impact. For F5 Advanced WAF or BIG-IP ASM deployments, update attack signatures and enable signature 200103548, “PHP-CGI Shell Code Injection.” These controls do not replace patching.
Remediation
Patch, then assume compromise.
The original fixes are PHP 8.1.29, 8.2.20, and 8.3.8 for their respective branches. Upgrade to a current supported, vendor-patched PHP release rather than stopping at these minimum versions: CVE-2024-8926 subsequently bypassed the original fixes under certain nonstandard Windows code-page configurations. That bypass was addressed in PHP 8.1.30, 8.2.24, and 8.3.12. Migrate unsupported branches to a supported release or obtain a maintained vendor backport. For Echo php-7.2 packages, install version 7.2.34+e1 or later.
Exploits
38 exploits validated by Mallory's analysis. Hidden: 35 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries. Showing the 25 most capable, earliest first.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2024-4577 exploited in the wild?
- Yes. As of Nov 13, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jun 12, 2024.
- Is there a public exploit for CVE-2024-4577?
- Yes. Mallory tracks 38 public exploits or proofs of concept for CVE-2024-4577, the earliest disclosed Jun 6, 2024.
- Is there a patch for CVE-2024-4577?
- The original fixes are PHP 8.1.29, 8.2.20, and 8.3.8 for their respective branches. Upgrade to a current supported, vendor-patched PHP release rather than stopping at these minimum versions: CVE-2024-8926 subsequently bypassed the original fixes under certain nonstandard Windows code-page configurations.
- What products are affected by CVE-2024-4577?
- PHP Group Php and Fedora Project Fedora.
- How severe is CVE-2024-4577?
- CVE-2024-4577 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 100.0% (100th percentile) as of Nov 13, 2026.
Recent activity
106 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.