SARA / Free Tools / CVE / CVE-2024-4577

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 functi

CVSS
9.8 CRITICAL
EPSS
94.37% (top 0.00%)
CWE
CWE-78
Published
2024-06-09T19:42:36.464Z
Last modified
2025-10-21T23:05:16.089Z
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA KEV — Actively Exploited
Added to KEV
2024-06-12
BOD 22-01 due
2024-07-03
Ransomware use
Known

01What is this 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…

02Affected products

VendorProductVersions
PHP GroupPHP8.1.*, 8.2.*, 8.3.*

03Active exploitation status

Yes — actively exploited. Added to the CISA KEV catalog on 2024-06-12. Ransomware use: Known.

04Recommended remediation

05Technical details

For the full vendor write-up, exploit chains, and reference implementations, see the references list in section 09.

06Detection signatures

Open the Sigma generator with a pre-filled prompt for this CVE to draft a starting detection in your stack of choice:

Open in Sigma generator →

07Related CVEs

No directly-cited follow-up CVEs in the KB record for this advisory. The references list in section 09 carries the vendor cross-references.

08Timeline

09References

Want this in your SOAR or SIEM?
SARA's API returns EPSS, CVSS, KEV, and an analyst-grade summary in one call.
Read the API reference →