Skip to content

CVE-2024-4577

PHP-CGI OS Command Injection

9.8 CRITICALActively exploited (CISA KEV)Used in ransomwarePublic exploitEPSS 100.0%
  1. Published9 Jun 2024
  2. Added to CISA KEV12 Jun 2024
  3. Remediation due3 Jul 2024
Actively exploited (CISA KEV)

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.

Added to KEV: 12 Jun 2024Federal remediation due: 3 Jul 2024Used in ransomware

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.

CVSS 3.1 breakdown

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

PHP≥ 8.1.0 < 8.1.29 · ≥ 8.2.0 < 8.2.20 · ≥ 8.3.0 < 8.3.8
Fedoraproject Fedora39 · 40

Remediation

Fixed in
PHP≥ 8.1.29

Frequently asked

Is CVE-2024-4577 being actively exploited?

Yes. CVE-2024-4577 is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added 12 Jun 2024. It has been used in ransomware campaigns.

How severe is CVE-2024-4577?

CVE-2024-4577 has a CVSS 3.1 base score of 9.8, rated critical. EPSS estimates a 100.0% probability of exploitation.

Which products are affected by CVE-2024-4577?

Affected products include PHP, Fedoraproject Fedora.

How do I fix CVE-2024-4577?

Upgrade affected software to a fixed version, for example PHP 8.1.29 or later, then confirm no affected versions remain in your inventory.

How Secuno handles this

Secuno correlates vulnerabilities like CVE-2024-4577 against the real software inventory on every managed device, every day. Rather than a static severity, each match is scored in context: exploit availability, EPSS, the asset's exposure, and business criticality decide where it lands in the queue. Because it is on the CISA KEV list, Secuno flags any affected asset as top-priority automatically. If an affected version is present anywhere across your portfolio, it surfaces automatically with a prioritised remediation path.

Get Patch this first every Monday

Five vulnerabilities that matter this week, ranked on real exploitation. Plain language, one email, no spam.

You can unsubscribe with one click from every issue. We handle your details as described in our privacy policy.

Data from the NVD, CISA KEV catalog and FIRST EPSS. CVSS 3.1 base score shown where available.