CVE-2024-4577: PHP-CGI Argument Injection on Windows
- Vendors
- Fedora ProjectPHP Group
CVE-2024-4577 is an argument-injection vulnerability affecting PHP-CGI deployed with Apache on Windows under certain system code-page configurations. Windows Best-Fit character conversion can transform attacker-controlled characters in HTTP query strings into characters interpreted by PHP-CGI as command-line options. An unauthenticated remote attacker can inject PHP options to disclose script source code or execute arbitrary PHP code. Affected supported branches at disclosure were PHP 8.1 before 8.1.29, PHP 8.2 before 8.2.20, and PHP 8.3 before 8.3.8.
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 compromises the confidentiality and integrity of the affected application and can compromise server availability. Source-code disclosure can expose application logic and embedded credentials, while arbitrary PHP execution gives attackers access to data and operating-system capabilities available to the PHP service account. Further compromise depends on that account's privileges and access to other systems. The vulnerability has been exploited in the wild, including in ransomware campaigns, and is listed in CISA's Known Exploited Vulnerabilities catalog.
Mitigation
If you can’t patch tonight, do this now.
Until patching is complete, disable unnecessary PHP-CGI exposure or restrict access to affected endpoints to trusted networks. Where feasible, migrate away from the affected Windows CGI execution configuration. Apply least privilege to the PHP service account to limit post-exploitation access. Deployments using F5 Advanced WAF or BIG-IP ASM can apply attack signature 200103548, PHP-CGI Shell Code Injection, as an additional defensive control rather than a substitute for patching.
Remediation
Patch, then assume compromise.
Install a currently supported, fully patched PHP release or an equivalent vendor-patched package. The original fixes were PHP 8.1.29, 8.2.20, and 8.3.8. Do not treat those minimum versions as sufficient protection against subsequent related vulnerabilities: CVE-2024-8926 bypasses the original fix under nonstandard Windows code-page configurations and was addressed in PHP 8.1.30, 8.2.24, and 8.3.12. Upgrade unsupported installations to a supported branch. For Echo php-7.2 packages, the prescribed vendor update is 7.2.34+e1 or later.
Exploits
39 exploits validated by Mallory's analysis. Hidden: 35 rejected by Mallory's analysis as not a working exploit; 2 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 28, 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 39 public exploits or proofs of concept for CVE-2024-4577, the earliest disclosed Jun 6, 2024.
- Is there a patch for CVE-2024-4577?
- Install a currently supported, fully patched PHP release or an equivalent vendor-patched package. The original fixes were PHP 8.1.29, 8.2.20, and 8.3.8.
- 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 94.8% (100th percentile) as of Nov 28, 2026.
Recent activity
108 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.