CVE-2024-4577

Description

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.

Severity
CRITICAL
CVSS v3
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H · source cna
Exploit chance (EPSS)
99.987%
chance of exploitation in the next 30 days
among the highest of scored CVEs · 2026-11-17
CISA KEV
Listed
added 2024-06-12 · known ransomware use
Public exploit code
Yes
Exploit references (NVD and CNA): 12
Metasploit modules: 1
Nuclei templates: 1
Exploit-DB: 1

Weakness

CISA Known Exploited Vulnerabilities entry

Vulnerability namePHP-CGI OS Command Injection Vulnerability
Vendor / productPHP Group / PHP
Date added2024-06-12
Federal remediation due date2024-07-03
Required actionApply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
Known ransomware campaign useKnown

CISA SSVC decision points

Exploitationactive
Automatableyes
Technical impacttotal
Scored2024-06-15

Timeline

  1. 2024-06-09Published by the CNA19:42 UTC
  2. 2024-06-12Added to the CISA KEV catalog3 days after publication
  3. 2024-06-15CISA SSVC decision recorded6 days after publication
  4. 2025-06-15First Exploit-DB entry (EDB-ID 52331)371 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

Exploit-DBTypePlatformPublishedEDB-verified
EDB-ID 52331webappsphp2025-06-15no

Nuclei templates:

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
php phpfrom 8.1.0 before 8.1.29fixed in 8.1.29from 8.2.0 before 8.2.20fixed in 8.2.20from 8.3.0 before 8.3.8fixed in 8.3.88.1.298.2.208.3.8
fedoraproject fedora39no fix listed40no fix listednot listednot listed

Products and versions as NVD and the vendor that published the CVE list them.

References

23 references in total; the first 20 are shown.

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources