CVE-2024-4577 — PHP-CGI OS Command Injection Vulnerability
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.
Who exploits it and how urgent it is
A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.
How the score was calculated
- Confirmed exploitation (CISA KEV)+35
- Used in ransomware campaigns (CISA)+10
- Public exploit/PoC (nuclei, metasploit, exploitdb, github)+20
- EPSS 100% (30-day exploitation probability)+15
- Technical severity (critical)+10
- Automatable exploitation (SSVC)+3
The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.
CISA SSVC assessment CISA
Three decision points CISA publishes for the CVEs it assesses (SSVC 2.0.3). A stakeholder decision, not a severity score.
Remediation
Fixes and mitigations documented by the sources — linked to the original advisory.
- Documented patch — github.com (NIST National Vulnerability Database)
CISA required action CISA
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
US federal deadline: Jul 3, 2024 — passed 834 day(s) ago
First 24 hours
Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.
- Identify exposed assets running the affected vendor/product/version combinations (Fedoraproject Fedora, Php Php, PHP Group PHP).
- Treat as emergency remediation: the CVE is in CISA KEV (confirmed exploitation).
- The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
- Apply the fixed version or the patch documented under Remediation.
- EPSS ahead of 100% of scored CVEs: prioritize it in the patch queue.
- Search available logs for exploit probes matching the vulnerability class (injection), errors and authentication anomalies.
Affected scope
Vendor, product and versions as the sources word them.
| Vendor | Product | Versions | Status | Source |
|---|---|---|---|---|
| Fedoraproject | Fedora | version 39version 40 | Vulnerable | NIST National Vulnerability Database |
| Php | Php | ≥ 8.1.0 and < 8.1.29≥ 8.2.0 and < 8.2.20≥ 8.3.0 and < 8.3.8 | Vulnerable | NIST National Vulnerability Database |
| PHP Group | PHP | ≥ 8.1.* and < 8.1.29≥ 8.2.* and < 8.2.20≥ 8.3.* and < 8.3.8 | Vulnerable | CVE Program (cve.org) e CISA ADP |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Every base score collected
Sources score independently and may disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Scored by |
|---|---|---|---|---|---|
| 9.8 | CVSS 3.1 | Critical | 3.9 | 5.9 | security@php.net via NIST National Vulnerability Database |
| 9.8 | CVSS 3.1 | Critical | 3.9 | 5.9 | nvd@nist.gov via NIST National Vulnerability Database |
| 9.8 | CVSS 3.1 | Critical | — | — | GitHub, Inc. via GitHub Security Advisories |
| 9.8 | CVSS 3.1 | Critical | — | — | php via CVE Program (cve.org) e CISA ADP |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (score shown at the top: nvd@nist.gov) Weakness MITRE
Weakness class according to MITRE’s CWE catalog.
CISA KEV details CISA
CISA lists a CVE once it has evidence of exploitation against real targets.
CISA records ransomware use only for campaigns it has confirmed, so “Unknown” means unrecorded, not ruled out. The deadline binds US federal agencies; for everyone else it is a reference date.
Public exploits, PoCs and detection templates
Public code that demonstrates or tests the flaw raises the odds of mass exploitation — and Nuclei templates help find vulnerable assets in your environment.
- PHP CGI Argument Injection Remote Code Execution excellent Jun 6, 2024
- PHP CGI Module 8.3.4 - Remote Code Execution (RCE) Jun 15, 2025
- PHP CGI Argument Injection (CVE-2024-4577) Remote Code Execution PoC ★ 322 Jun 7, 2024
- [漏洞复现] 全球首款利用PHP默认环境(XAMPP)的CVE-2024-4577 PHP-CGI RCE 漏洞 EXP。 ★ 160 Jun 8, 2024
- CVE-2024-4577 is a critical vulnerability in PHP affecting CGI configurations, allowing attackers to execute arbitrary commands via crafted URL parameters. ★ 75 Jun 7, 2024
- 一個測試CVE-2024-4577和CVE-2024-8926的安全滲透工具 ★ 52 Mar 15, 2025
- POC & $BASH script for CVE-2024-4577 ★ 43 Jun 7, 2024
- PHP CGI Argument Injection vulnerability ★ 35 Jun 9, 2024
- PHP RCE PoC for CVE-2024-4577 written in bash, go, python and a nuclei template ★ 33 Jun 8, 2024
- PHP CGI Argument Injection (CVE-2024-4577) RCE ★ 26 Aug 20, 2024
- CVE-2024-4577 RCE PoC ★ 25 Nov 6, 2024
- huseyinstif/CVE-2024-4577-Nuclei-Template ★ 21 Jun 7, 2024
Warning: public PoCs are sometimes disguised malware. Use them only for authorized testing in an isolated environment. This portal does not host exploit code — it only points to the sources.
EPSS over time FIRST
Oct 12, 2026 → Oct 14, 2026 · 3 reading(s) · max 99.99%
Detection
Read off the CVSS vector and the weakness class. Starting points, not tested rules.
- Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
- Look for parameters with command/query metacharacters and unexpected child processes of the service.
- Hunt retroactively in logs from before Jun 12, 2024 (KEV listing): exploitation may have started earlier.
Timeline
What happened to this CVE, newest first.
- 2026
- Affected products added · php group/php
- SSVC assessment updated
- Record published
- Fix documented
- Affected products added · php/php, fedoraproject/fedora
- CVSS changed · 9.8
- Source status changed · → Analyzed
- Added to CISA KEV (detected)
- Record created in this database
- 2024
- Added to CISA KEV catalog
- CVE published
Source activity
Repeated readings are counted rather than listed.
- 2× References added · Oct 13, 2026 – Oct 13, 2026
- 1× Official description updated · Oct 13, 2026 – Oct 13, 2026
References
33 on the record
- github.com/rapid7/metasploit-framework/pull/19247
- www.cisa.gov/known-exploited-vulnerabilities-catalog
- www.php.net/ChangeLog-8.php
- security.netapp.com/advisory/ntap-20240621-0008
- www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-457
- www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-45
- github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
- labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577
- arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-
- github.com/watchtowrlabs/CVE-2024-4577
- www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBO
- isc.sans.edu/diary/30994
- github.com/advisories/GHSA-vxpp-6299-mxw3
- blog.talosintelligence.com/new-persistent-attacks-japan/
- labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
- github.com/xcanwin/CVE-2024-4577-PHP-RCE
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQU
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQU
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W45DBO
- www.openwall.com/lists/oss-security/2024/06/07/1
- blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
- arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-
- nvd.nist.gov/vuln/detail/CVE-2024-4577
- blog.talosintelligence.com/new-persistent-attacks-japan
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injecti
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injecti
- www.php.net/ChangeLog-8.php
- security.netapp.com/advisory/ntap-20240621-0008/
- www.php.net/ChangeLog-8.php
- www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-457
- github.com/11whoami99/CVE-2024-4577
- cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
Elsewhere on this site
Related CVEs (same products)
- Low CVE-2025-1218 Various packet overreads in mysqlnd_writeprotocol.c 19d
- Medium CVE-2025-14181 Integer overflow to buffer overflow in soap HTTP parsing 19d
- High CVE-2026-54230 Abrt: event handler scripts follow symlinks when writing output files, allowing arbitrary file overwrites Jun 13, 2026
- Medium CVE-2026-54231 Abrt: unsanitized systemd journal content written to dump directory files enables content injection Jun 13, 2026
- High CVE-2026-7263 DoS attack via DOMNode::C14N() May 10, 2026
- Critical CVE-2026-6104 Global buffer over-read in mb_convert_encoding() with attacker-supplied encoding May 10, 2026
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record
Text assembled only from the fields above — no additional claims.
What should defenders know first?
CVE-2024-4577 is "PHP-CGI OS Command Injection Vulnerability", rated Critical. It affects Fedora (Fedoraproject); versions are in the scope table. It is in CISA KEV: there is evidence of real-world exploitation. CVSS 9.8 describes technical severity. EPSS 99.99% estimates the probability of exploitation in 30 days; neither replaces your asset context. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.
Comments
Moderated technical discussion. Read the community guidelines.
No comments yet.
Sign in or create an account to comment and suggest corrections.