Home / PHP Group / PHP / CVE-2024-4577
CVE-2024-4577: is it exploited, and which versions of PHP Group PHP are affected and fixed?
CVE-2024-4577 is an OS command injection vulnerability in PHP Group PHP, and it is exploited in the wild: CISA added it to its Known Exploited Vulnerabilities catalog on June 12, 2024, with a federal due date of July 3, 2024. Affected: PHP from 8.1.* before 8.1.29, PHP from 8.2.* before 8.2.20 and PHP from 8.3.* before 8.3.8 (CVE record by php). Fixed in 8.1.29, 8.2.20 and 8.3.8 (CVE record by php). Severity: Critical (9.8, CVSS 3.1, from php).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 10:38 UTC, CVE record November 28, 2026, 16:16 UTC and NVD November 19, 2026, 07:29 UTC.
What is CVE-2024-4577?
Argument Injection in PHP-CGI
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.
From the CVE record by php, last updated October 21, 2025, 23:05 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| PHP Group | PHP Windows | from 8.1.* before 8.1.29 from 8.2.* before 8.2.20 from 8.3.* before 8.3.8 | 8.1.29, 8.2.20, 8.3.8 |
As the CVE record by php states it, last updated October 21, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| php | php | from 8.1.0 before 8.1.29 | application |
| php | php | from 8.2.0 before 8.2.20 | application |
| php | php | from 8.3.0 before 8.3.8 | application |
| fedoraproject | fedora | 39 | operating system |
| fedoraproject | fedora | 40 | operating system |
NVD analysis (status Analyzed), last modified June 17, 2026, 08:02 UTC.
How severe is CVE-2024-4577?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.8 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | php |
| Critical 9.8 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-4577 exploited in the wild?
- CISA KEV
- Listed as PHP-CGI OS Command Injection Vulnerability, added June 12, 2024; federal agencies must act by July 3, 2024
- Required action
- Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
- Ransomware use
- Known
- CISA's summary
- 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.
- CISA SSVC
- Exploitation: active; automatable: yes; technical impact: total (CISA ADP, June 15, 2024)
- EPSS
- 100.0% probability of exploitation activity in the next 30 days, percentile 100.0 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
Where are the vendor advisories and references?
- https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/
- https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/
- https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/
- https://github.com/11whoami99/CVE-2024-4577
- https://github.com/xcanwin/CVE-2024-4577-PHP-RCE
- https://github.com/rapid7/metasploit-framework/pull/19247
- https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
- https://github.com/watchtowrlabs/CVE-2024-4577
- https://www.php.net/ChangeLog-8.php#8.1.29
- https://www.php.net/ChangeLog-8.php#8.2.20
- https://www.php.net/ChangeLog-8.php#8.3.8
- https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
- https://isc.sans.edu/diary/30994
- http://www.openwall.com/lists/oss-security/2024/06/07/1
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
- https://security.netapp.com/advisory/ntap-20240621-0008/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-4577 government-resource
- https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577
- https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577
- https://blog.talosintelligence.com/new-persistent-attacks-japan/
Who found and reported it?
- Orange Tsai, DEVCORE Research Team (reporter)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- May 6, 2024
- Published
- June 9, 2024, 19:42 UTC
- CVE record updated
- October 21, 2025, 23:05 UTC by php
- NVD
- Analyzed, last modified June 17, 2026, 08:02 UTC
- Last checked
- CVE list November 28, 2026, 16:16 UTC; NVD November 19, 2026, 07:29 UTC; KEV December 3, 2026, 10:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD · CISA KEV
What other CVEs affect PHP?
- Oct 21, 2026CVE-2026-109619 PHP Group PHP: use after free exploited
- Oct 21, 2026CVE-2026-109618 PHP Group PHP: use after free exploited
- Nov 19, 2026CVE-2026-129501 PHP Group PHP: double free
- Nov 19, 2026CVE-2026-129289 PHP Group PHP: HTTP request smuggling
- Nov 19, 2026CVE-2026-15353 PHP Group PHP: out-of-bounds read
- Nov 19, 2026CVE-2026-127960 PHP Group PHP: denial of service (uncontrolled resource consumption)
- Nov 19, 2026CVE-2026-129438 PHP Group PHP: integer overflow
- Nov 19, 2026CVE-2026-129291 PHP Group PHP: use after free
Questions about CVE-2024-4577
Is CVE-2024-4577 exploited in the wild?
Yes. CISA added CVE-2024-4577 to its Known Exploited Vulnerabilities catalog on June 12, 2024 and set federal agencies a due date of July 3, 2024. CISA lists it as used in ransomware campaigns. FIRST's EPSS gives it a 100.0% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of PHP Group PHP are affected by CVE-2024-4577?
PHP from 8.1.* before 8.1.29, PHP from 8.2.* before 8.2.20 and PHP from 8.3.* before 8.3.8, per the CVE record by php. The tables above give every range the sources list.
Which version fixes CVE-2024-4577?
8.1.29, 8.2.20 and 8.3.8, per the CVE record by php. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-4577?
Critical (9.8, CVSS 3.1, from php). The severity table above shows each score with its source.
Where is the official record of CVE-2024-4577?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov; CISA's entry is in its Known Exploited Vulnerabilities catalog. For a fix, the vendor's own advisory is the one to follow.