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
9.8CVSS 3.1 scoreCRITICAL
Exploit probability (EPSS)100.0%
100th percentile of all scored CVEs
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
01

In short

CVE-2024-4577 (PHP-CGI OS Command Injection) has a CVSS 3.1 base score of 9.8, rated critical. CISA added it to the Known Exploited Vulnerabilities catalog on 12 Jun 2024, and it has been used in ransomware campaigns. Fixed in PHP 8.1.29 or later. The Dutch NCSC covers it in advisory NCSC-2024-0414.

02

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.

03

CVSS 3.1 breakdown

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
04

Affected products

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

Remediation

Fixed in
  • PHP≥ 8.1.29
Patch & vendor advisories

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. The CVSS 4.0 base score is shown where the NVD has one, otherwise CVSS 3.1.

06:00 · IN YOUR FLEET

How Secuno handles this

Secuno matches CVE-2024-4577 against the software on every managed device each hour and ranks it by exploit status, EPSS and exposure. Because it is on the CISA KEV list, its fix goes straight to the Emergency patch lane.