CVE-2024-4577

CRITICAL CVSS 3.1: 9.8 EPSS 100.0% ACTIVE EXPLOIT
Updated Jun 17, 2026
Microsoft

CISA Known Exploited Vulnerability (KEV)

This vulnerability is actively exploited in the wild. Immediate patching is strongly recommended.

Due Date: Jul 03, 2024

Parameter Value
CVSS 9.8 (CRITICAL)
Affected Versions 8.1.0 — 8.3.8
Fixed In 8.1.29
Type CWE-78 (OS Command Injection)
Vendor Microsoft
Public PoC Yes

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.

Attack Parameters

Attack Vector
Network
Can be exploited remotely
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
High
Complete data leak
Integrity
High
Complete data modification
Availability
High
Complete denial of service

CVSS Vector v3.1

Weakness Type (CWE)

Vulnerable Products 6

Configuration From (including) Up to (excluding)
Php Php
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
8.1.0 8.1.29
Php Php
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
8.2.0 8.2.20
Php Php
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
8.3.0 8.3.8
Microsoft Windows
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
— —
Fedoraproject Fedora
cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
— —
Fedoraproject Fedora
cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*
— —

References 23

http://www.openwall.com/lists/oss-security/2024/06/07/1
security@php.net
https://arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-…
security@php.net
https://blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html
security@php.net
https://cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately
security@php.net
https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-…
security@php.net
https://github.com/11whoami99/CVE-2024-4577
security@php.net
https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv
security@php.net
https://github.com/rapid7/metasploit-framework/pull/19247
security@php.net
https://github.com/watchtowrlabs/CVE-2024-4577
security@php.net
https://github.com/xcanwin/CVE-2024-4577-PHP-RCE
security@php.net
https://isc.sans.edu/diary/30994
security@php.net
https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
security@php.net
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproj…
security@php.net
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproj…
security@php.net
https://security.netapp.com/advisory/ntap-20240621-0008/
security@php.net
https://www.imperva.com/blog/imperva-protects-against-critical-php-vulnerabilit…
security@php.net
https://www.php.net/ChangeLog-8.php#8.1.29
security@php.net
https://www.php.net/ChangeLog-8.php#8.2.20
security@php.net
https://www.php.net/ChangeLog-8.php#8.3.8
security@php.net
https://blog.talosintelligence.com/new-persistent-attacks-japan/
af854a3a-2127-422b-91ae-364da2661108
https://www.vicarius.io/vsociety/posts/php-cgi-argument-injection-to-rce-cve-20…
af854a3a-2127-422b-91ae-364da2661108
https://www.vicarius.io/vsociety/posts/php-cgi-os-command-injection-vulnerabili…
af854a3a-2127-422b-91ae-364da2661108
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024…
134c704f-9b21-4f2e-91b3-4a467353bcc0