CVE-2024-4577 | Argument Injection in PHP-CGI

Exp

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.

Published: 2024-06-09 Last update: 2025-11-03 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-4577 is rated Critical Active Threat (99.2/100): CVSS Critical severity, with high exploitation likelihood (EPSS 94.39%, 100th percentile). Core evidence: CISA KEV confirms active exploitation (added 2024-06-12) affecting PHP Group / PHP. a weakness (CWE-78) Unauthenticated remote administrative access may be possible. Mandatory action: The CISA remediation deadline has passed—treat as an emergency patch priority.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

CISA KEV Record for CVE-2024-4577

Name: PHP-CGI OS Command Injection Vulnerability · CISA KEV detail

Exploit added: 2024-06-12

Action due: 2024-07-03

Required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.

Public exploit references (Exploit-DB) for CVE-2024-4577

EDB-ID Source Kind Published Link
52331 exploit_db edb 2025-06-15 Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2024-4577

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-11-21 94.34% 94.39% +0.05%
2 2025-11-18 94.42% 94.34% -0.08%
3 2025-03-17 94.42%

Full EPSS history (20 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-4577

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]

Weakness enumeration for CVE-2024-4577

OS Trackers for CVE-2024-4577

vendor priority summary link
debian unimportant CVE-2024-4577 unimportant priority: Debian including 2 source packages (php7.4, php8.2), 2 status rows across 2 suites (bookworm, bullseye): resolved 2. https://security-tracker.debian.org/tracker/CVE-2024-4577
gentoo high CVE-2024-4577: 1 GLSA(s) (202408-32), 1 atom(s) (dev-lang/php); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2024-4577
redhat critical https://access.redhat.com/security/cve/CVE-2024-4577
suse critical CVE-2024-4577 severity critical: SUSE including 368 source package names (apache2-mod_php5, apache2-mod_php7, …), 1601 product×package rows across 27 product lines (SUSE Enterprise Storage 7.1, SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS, … (27 product lines)): Known Not Affected 1500, Fixed 101. https://www.suse.com/security/cve/CVE-2024-4577/
ubuntu medium CVE-2024-4577 medium priority: Ubuntu including 7 source packages (php5, php7.0, …), 38 status rows across 8 suites (bionic, focal, jammy, mantic, noble, trusty, upstream, xenial): DNE 24, needs-triage 7, not-affected 7. https://ubuntu.com/security/CVE-2024-4577

Affected software / configurations for CVE-2024-4577

Vendor Product Version Raw CPE
php php >= 8.1.0, < 8.1.29 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.2.0, < 8.2.20 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 8.3.0, < 8.3.8 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
fedoraproject fedora 39 cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
fedoraproject fedora 40 cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*

References for CVE-2024-4577

URL Tags
http://www.openwall.com/lists/oss-security/2024/06/07/1 Mailing List Third Party Advisory
https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/ Exploit Press/Media Coverage Third Party Advisory
https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html Third Party Advisory
https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately Third Party Advisory
https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/ Exploit Third Party Advisory
https://github.com/11whoami99/CVE-2024-4577 Exploit
https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv Exploit Third Party Advisory
https://github.com/rapid7/metasploit-framework/pull/19247 Exploit Issue Tracking Patch
https://github.com/watchtowrlabs/CVE-2024-4577 Exploit Third Party Advisory
https://github.com/xcanwin/CVE-2024-4577-PHP-RCE Exploit Third Party Advisory
https://isc.sans.edu/diary/30994 Exploit Third Party Advisory
https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/ Exploit Third Party Advisory
https://lists.fedoraproject.org/archives/list/[email protected]/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ Mailing List
https://lists.fedoraproject.org/archives/list/[email protected]/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/ Mailing List
https://security.netapp.com/advisory/ntap-20240621-0008/ Third Party Advisory
https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerability-cve-2024-4577/ Third Party Advisory
https://www.php.net/ChangeLog-8.php#8.1.29 Release Notes
https://www.php.net/ChangeLog-8.php#8.2.20 Release Notes
https://www.php.net/ChangeLog-8.php#8.3.8 Release Notes
https://blog.talosintelligence.com/new-persistent-attacks-japan/ Exploit Third Party Advisory
https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-2024-4577 Exploit Third Party Advisory
https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerability-cve-2024-4577 Exploit Third Party Advisory
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-4577 US Government Resource
cvelogic Threat Intelligence