BreachSpiderVerified, not vibes

CVE-2024-4577 in Fedoraproject Fedora and 3 more products

Known-exploited (CISA) since 2024-06-12 Critical 9.8 Public exploit reported

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

Affects 4 products from 4 vendors. Facts below cite their sources.

CVSS 3.19.8
EPSS94.8%
EPSS percentile100th
FixSee advisory

Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Fedoraproject Fedora 39 40
Php Php ≥ 8.1.0, < 8.1.29 ≥ 8.2.0, < 8.2.20 ≥ 8.3.0, < 8.3.8
Php Group Php ≥ 8.1.0, < 8.1.29 ≥ 8.2.0, < 8.2.20 ≥ 8.3.0, < 8.3.8

Platforms listed by the source (the vulnerable product runs on these; they are not themselves vulnerable): Microsoft Windows

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

View Vendor Advisory →

Exploitation

CISA known-exploitedYes added 2024-06-12
Public exploitReported · reference

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

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2024-4577
BreachSpider IDBS-2024-GLOBAL-269527-C
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published2024-06-09
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-78: OS Command Injection

Attacker injects OS commands through application inputs passed to system() or equivalent calls, leading to arbitrary command execution.

Related attack patterns (CAPEC)

CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-78

CAPEC-108 Command Line Execution through SQL Injection via CWE-78

CAPEC-6 Argument Injection via CWE-78

CAPEC-15 Command Delimiters via CWE-78

CAPEC-88 OS Command Injection via CWE-78

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2024-4577 affects PHP versions 8.1.*, 8.2.*, and 8.3.* when used with Apache and PHP-CGI on Windows. The vulnerability allows a malicious user to pass options to the PHP binary, potentially leading to source code disclosure and arbitrary code execution. Given the high CVSS score and the presence of public exploits, immediate attention is required to mitigate this risk in ICS/OT environments.

The vulnerability arises from the 'Best-Fit' behavior of Windows when using certain code pages. This can cause the PHP CGI module to misinterpret characters as PHP options, allowing an attacker to manipulate the command line arguments passed to the PHP binary. This can lead to unauthorized access, script source code disclosure, and execution of arbitrary PHP code on the server.

Compensating controls AI-drafted, review before use

Implement strict input validation and sanitization for all PHP CGI requests. Use a web application firewall (WAF) to filter out suspicious requests containing PHP options in the query string.

NERC CIP: CIP-007 CIP-007-R2

IEC 62443: SR 7.6

Not validated for your network. A compensating control does not replace the vendor fix.

Questions

What is CVE-2024-4577?

CVE-2024-4577 affects PHP versions 8.1.*, 8.2.*, and 8.3.* when used with Apache and PHP-CGI on Windows. The vulnerability allows a malicious user to pass options to the PHP binary, potentially leading to source code disclosure and arbitrary code execution. Given the high CVSS score and the presence of public exploits, immediate attention is required to mitigate this risk in ICS/OT environments.

What is the CVSS score for CVE-2024-4577?

CVE-2024-4577 has CVSS 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 94.8%.

Is CVE-2024-4577 actively exploited?

Yes. CVE-2024-4577 is in the CISA known-exploited catalog (added 2024-06-12). Active exploitation confirmed. Immediate patching required.

How do I remediate CVE-2024-4577?

Priority: IMMEDIATE. Advisory: https://www.php.net/ChangeLog-8.php#8.1.29

What systems are affected by CVE-2024-4577?

CVE-2024-4577 affects Fedoraproject Fedora; Php Php; Php Group Php.

What NERC-CIP standard applies to CVE-2024-4577?

NERC CIP CIP-007 CIP-007-R2: This CVE violates CIP-007-R2 by allowing unauthorized access to the control system environment, which could compromise the integrity and availability of critical assets.

What IEC 62443 requirement maps to CVE-2024-4577?

IEC 62443 SR 7.6: This CVE maps to SR 7.6 because it involves the protection of the software development process and the prevention of unauthorized access to the system, which is essential for maintaining the security of the ICS environment.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Fedoraproject","product":"Fedora","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.