Skip to content
Vulnerability Intelligence

CVE-2024-4577

CriticalExploitedPublic exploit

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.

Published Jun 7, 2024 · Updated Sep 8, 2026 · Also known as BIT-libphp-2024-4577, BIT-php-2024-4577, BIT-php-min-2024-4577, GHSA-3qgc-jrrr-25jv

Key Facts

Patch immediately
  • CVE-2024-4577 is a critical-severity vulnerability (CVSS 9.8 v3.1) affecting PHP, Fedora (Fedoraproject), php81 (alpine) and 22 more products.
  • It is exploited in the wild, listed in CISA KEV, Industry KEV feed, CIRCL KEV, ENISA EUVD since Jun 7, 2024 and is known to be used in ransomware campaigns. Public exploit code is available.
  • EPSS estimates a 100% probability of exploitation in the next 30 days.
  • Fixed versions are available, including libphp 8.1.29, libphp 8.2.20, libphp 8.3.8.
  • Brandefense priority: patch immediately, because it is listed as exploited in the wild.

CVSS v3.1

9.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS (30-day exploit likelihood)

100%

Higher than 99.9% of all scored CVEs

Exploited in the wild

Yes

4 catalog listings, used by ransomware

Public exploit code

Available

Proof-of-concept or weaponized module

Get the full CVE-2024-4577 brief as a PDF

Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.

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.

Known-Exploited Catalog Listings

CatalogAddedRemediation dueRansomware use
CISA KEVJun 12, 2024Jul 3, 2024Known
Industry KEV feedJun 7, 2024Jul 3, 2024Known
CIRCL KEVJun 7, 2024Jul 3, 2024Known
ENISA EUVDJun 12, 2024n/aNot reported

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

Affected Products

66 affected entries in total
ProductAffected versionsFixed in
PHPPHP>= 8.1.*8.1.29
FedoraFedoraproject39, 40n/a
php81alpineSee advisory8.1.29-r0
php82alpineSee advisory8.2.20-r0
php83alpineSee advisory8.3.8-r0
20 more affected products in the full CVE brief

Patched Releases

libphp

8.1.29, 8.2.20, 8.3.8

PHP

8.1.29, 8.1.29-1, 8.2.20, 8.3.8, 8.3.8-1

php-8.1

8.1.29-r0

php-8.2

8.2.20-r0

php-min

8.1.29, 8.2.20, 8.3.8

php8

8.3.12-1.1

php8-bcmath

8.3.12-1.1

php8-bz2

8.3.12-1.1

php8-calendar

8.3.12-1.1

php8-cli

8.3.12-1.1

php8-ctype

8.3.12-1.1

php8-curl

8.3.12-1.1

php8-dba

8.3.12-1.1

php8-devel

8.3.12-1.1

php8-dom

8.3.12-1.1

php8-enchant

8.3.12-1.1

php8-exif

8.3.12-1.1

php8-ffi

8.3.12-1.1

php8-fileinfo

8.3.12-1.1

php8-ftp

8.3.12-1.1

php8-gd

8.3.12-1.1

php8-gettext

8.3.12-1.1

php8-gmp

8.3.12-1.1

php8-iconv

8.3.12-1.1

php8-intl

8.3.12-1.1

Timeline

  1. Publicly disclosed

    Jun 7, 2024

  2. Added to Industry KEV feed

    Jun 7, 2024

  3. Added to CIRCL KEV

    Jun 7, 2024

  4. Added to CISA KEV

    Jun 12, 2024

  5. Added to ENISA EUVD

    Jun 12, 2024

  6. Last updated

    Sep 8, 2026

Weakness Type

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

References

15 more references in the full CVE brief

FAQ

Common Questions.

Is CVE-2024-4577 Running On Your Attack Surface?

Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.

Request A Demo