CVE-2024-4577
CRITICALCISA KEVEPSS 100th pctlDescription
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 to fix
TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works
Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.
CVSS v3 Vector
Exploitability
Impact
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Exploit Intelligence
Very high risk: more likely to be exploited than 100% of all known CVEs.
PHP-CGI OS Command Injection Vulnerability
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.
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
Remediation due: 2024-07-03
Associated with ransomware campaigns
References
Related Vulnerabilities
Other CWE-78 (OS Command Injection) vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2021-1498 | Critical | 9.8 | 100% | KEV | Fix |
| CVE-2014-6271 | Critical | 9.8 | 100% | KEV | Fix |
| CVE-2019-16920 | Critical | 9.8 | 100% | KEV | - |
| CVE-2022-44877 | Critical | 9.8 | 100% | KEV | Fix |
| CVE-2020-8515 | Critical | 9.8 | 100% | KEV | - |
| CVE-2020-9054 | Critical | 9.8 | 100% | KEV | Fix |
Common questions
How do I fix CVE-2024-4577?
Upgrade php to 8.3.8 or later.
Is CVE-2024-4577 being actively exploited?
Yes. CVE-2024-4577 is listed in the CISA Known Exploited Vulnerabilities catalog, which means exploitation has been observed in the wild. CISA has also linked it to known ransomware campaigns. US federal agencies were required to remediate it by 2024-07-03. Treat it as a priority whatever its CVSS score says.
How severe is CVE-2024-4577?
CVE-2024-4577 has a CVSS v3 base score of 9.8, rated critical. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.
What does CVE-2024-4577 affect?
Published advisories record a fix for php (NVD). Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.
Embed a live status badge for CVE-2024-4577
Markdown
[](https://tridentstack.com/cve/CVE-2024-4577)HTML
<a href="https://tridentstack.com/cve/CVE-2024-4577"><img src="https://tridentstack.com/cve/badge/CVE-2024-4577.svg" alt="CVE-2024-4577"></a>Find and fix vulnerabilities across your fleet
TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.
This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-11-03.