PHP-CGI OS Command Injection Vulnerability
PHP Group — PHP
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.
9.8
100.0%
Vector breakdown
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- Jun 9, 2024
- Modified
- Jun 17, 2026
- Added to KEV
- Jun 12, 2024
- Federal patch due
- Jul 3, 2024
CISA required action
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
Weakness classification
Affected packages
Proof-of-concept & exploitation references
8 foundWeaponization
Public repositories whose name or description references CVE-2024-4577, found via a live GitHub search at request time. These are community-sourced signals, not a verified working exploit - cross-check each one before relying on it, and treat higher star counts and recent activity as (weak) corroboration, not proof.
- watchtowrlabs/CVE-2024-4577★ 322
PHP CGI Argument Injection (CVE-2024-4577) Remote Code Execution PoC
updated Sep 3, 2026
- xcanwin/CVE-2024-4577-PHP-RCE★ 162
[漏洞复现] 全球首款利用PHP默认环境(XAMPP)的CVE-2024-4577 PHP-CGI RCE 漏洞 EXP。
updated Aug 24, 2026
- TAM-K592/CVE-2024-4577★ 75
CVE-2024-4577 is a critical vulnerability in PHP affecting CGI configurations, allowing attackers to execute arbitrary commands via crafted URL parameters.
updated Aug 15, 2026
- Night-have-dreams/php-cgi-Injector★ 51
一個測試CVE-2024-4577和CVE-2024-8926的安全滲透工具
updated Aug 24, 2026
- 11whoami99/CVE-2024-4577★ 43
POC & $BASH script for CVE-2024-4577
updated Mar 23, 2026
- Chocapikk/CVE-2024-4577★ 35
PHP CGI Argument Injection vulnerability
updated Aug 10, 2026
- ZephrFish/CVE-2024-4577-PHP-RCE★ 33
PHP RCE PoC for CVE-2024-4577 written in bash, go, python and a nuclei template
updated Jul 31, 2026
- BTtea/CVE-2024-4577-RCE-PoC★ 25
CVE-2024-4577 RCE PoC
updated Mar 11, 2026
References
How this class of flaw gets exploited
Frequently asked questions
What is CVE-2024-4577?
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.
How severe is CVE-2024-4577?
CVE-2024-4577 has a CVSS base score of 9.8 out of 10 (CVSS 3.1).
Is CVE-2024-4577 actively exploited in the wild?
Yes. CVE-2024-4577 is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added Jun 12, 2024, meaning CISA has confirmed evidence of active exploitation. It is also flagged as used in ransomware campaigns.
What is the EPSS score for CVE-2024-4577?
100.0% - meaning FIRST.org's EPSS model estimates a 100.0% probability this vulnerability will be exploited in the wild within 30 days (100% percentile among all scored CVEs).
Is there exploit tooling available for CVE-2024-4577?
Yes - a public Nuclei template referencing CVE-2024-4577 exist in public repositories we checked. We also found 8 public GitHub repositories referencing this CVE.
What type of vulnerability is CVE-2024-4577?
CVE-2024-4577 is classified under CWE-78 (CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')).
Cross-checked against
Impactr finds and proves whether CVE-2024-4577 - or flaws like it - are actually reachable in your own web apps and APIs, with a reproducible exploit as evidence.
Join the waitlist