Skip to content
Back to search

CVE-2024-4577

CRITICAL
9.8 RansomwareNVD

Summary

generated automatically from NVD data

CVE-2024-4577 affects PHP 8.1, 8.2 and 8.3 when run through Apache and PHP-CGI on Windows with certain code pages configured. Windows "Best-Fit" character replacement in command lines can cause the PHP CGI module to misread characters as PHP options, letting an attacker pass options to the PHP binary (an OS command injection weakness, CWE-78). This can expose script source code or allow arbitrary PHP code execution on the server. It is rated CRITICAL (CVSS v3.1 9.8) and is listed in the CISA KEV catalog, with known use in ransomware campaigns.

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

Share:

⚠️ Actively exploited — CISA KEV

This CVE was added to CISA's Known Exploited Vulnerabilities catalog on 2024-06-12. It is confirmed exploited in the wild and must be patched as a priority.

Remediation deadline (US federal agencies): 2024-07-03

Used in known ransomware campaigns.

EPSS · FIRST.org

94.8%probability of exploitation in the next 30 days

Higher than 99% of scored CVEs

EPSS (Exploit Prediction Scoring System) estimates, from observed exploitation activity, how likely a CVE is to be exploited in the next 30 days. It complements CVSS, which measures severity, not likelihood. Score of 2026-11-26, recomputed daily by FIRST.org.

In-depth analysis on cveo.tech

This CVE is covered in an article: context, affected versions and published fixes.

CVSS v3.1 Score

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

Information

Published
9 juin 2024
Updated
17 juin 2026
Status
Analyzed
Source
security@php.net

Affected products

Versions ≥ 8.1.0, < 8.1.29 · ≥ 8.2.0, < 8.2.20 · ≥ 8.3.0, < 8.3.8
fedoraproject fedora
Versions 39 · 40

Bounds published by NVD: "< 8.4.27" means 8.4.27 is no longer vulnerable. The fixed release to install is in the vendor advisory.

Weaknesses (CWE)

CWE-78CWE-78

Similar CVEs

Other vulnerabilities of type CWE-78

…

Running PHP servers? Know which CVEs hit your version.

Add the product and its version: cveo.tech lists the CVEs that affect it right away, then alerts you by email when a new one affects it — including before NVD has finished its analysis. Free, an account is all it takes.