Skip to main content
All vulnerabilities
CVE-2024-4577 Known ransomware use CVSS 9.8

PHP-CGI OS Command Injection Vulnerability

PHP Group — PHP

Published to NVD
9 June 2024
Disclosure to KEV listing
2 days
EPSS (30-day exploitation probability)
100.0% · 99.9th percentile · 23 November 2026
Added to KEV catalog
12 June 2024
Federal remediation due date
3 July 2024
Weakness classification (CWE)
CWE-78

Is CVE-2024-4577 actively exploited?

Yes. CISA added CVE-2024-4577 to its Known Exploited Vulnerabilities catalog on 12 June 2024, which means there is evidence it has been exploited in the wild. CISA also lists it as known to be used in ransomware campaigns. FIRST's EPSS model estimates a 100.0% probability of exploitation activity in the next 30 days, placing it in the 99.9th percentile of all scored CVEs.

How severe is CVE-2024-4577?

CVE-2024-4577 has a CVSS base score of 9.8 out of 10, rated Critical. Its CVSS vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The score measures technical severity; active exploitation, shown by the KEV listing, is the stronger reason to act quickly.

Which versions are affected by CVE-2024-4577?

NVD lists these affected versions for CVE-2024-4577: Php Php: from 8.1.0 up to (not including) 8.1.29; Php Php: from 8.2.0 up to (not including) 8.2.20; Php Php: from 8.3.0 up to (not including) 8.3.8; Fedoraproject Fedora 39; Fedoraproject Fedora 40.

How do I fix CVE-2024-4577?

CISA's required action for CVE-2024-4577 is: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable. The vendor advisory and patch links on this page point to the vendor's own fix guidance. US federal agencies must remediate it by 3 July 2024; treat that as an outside deadline, not a target.

Affected versions (NVD)

  • Php Php: from 8.1.0 up to (not including) 8.1.29
  • Php Php: from 8.2.0 up to (not including) 8.2.20
  • Php Php: from 8.3.0 up to (not including) 8.3.8
  • Fedoraproject Fedora 39
  • Fedoraproject Fedora 40

Version ranges as published in NVD's CPE configurations. Confirm against the vendor advisory before relying on them.

CISA Description

PHP, specifically Windows-based PHP used in CGI mode, contains an OS command injection vulnerability that allows for arbitrary code execution. This vulnerability is a patch bypass for CVE-2012-1823.

Required action

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

Notes

This vulnerability affects a common open-source component, third-party library, or a protocol used by different products. Please check with specific vendors for information on patching status. For more information, please see: https://www.php.net/ChangeLog-8.php#; https://nvd.nist.gov/vuln/detail/CVE-2024-4577

NVD Technical 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.

Confirm Your Exposure

Is this vulnerability present in your environment?

CRS delivers independent VAPT assessments that identify exactly which known-exploited vulnerabilities exist in your network, applications, and infrastructure.

Explore VAPT Services