Skip to main content
ExploitedIn CISA KEVFix available

CVE-2024-4577

Exploitation confirmed. First attested on 2024-06-07 by CISA-ADP, CISA KEV, GCVE · kevintel, GCVE · shadowserver, GCVE · siberkapan.

  • Published2024-06-09
  • Fixed in8.3.8 · 8.2.20 · 8.1.29
  • WeaknessCWE-78

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2024-06-0713:40Listed as exploited by GCVEGCVE
  2. 2024-06-0713:40Exploitation first reportedGCVE
  3. 2024-06-0920:15CVE publishedNVD
  4. 2024-06-12Added to the CISA KEV catalogCISA KEV
  5. 2024-06-1503:55SSVC exploitation set to activeCISA-ADP
  6. 2025-06-15Exploit-DB entryExploit-DB

Observed activity

isMalicious corpus · updated 2026-11-18 15:37 UTC
Indicators tagged with this CVE, per day3 indicators over 7 days
18
IndicatorSeen
79.76.58.11318 h ago
120.48.32.13018 h ago
75.119.132.10918 h ago
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2024-4577?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2024-4577?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD · OSV · CISA-ADP
PHPversion to verify
BranchAffectedFixed in
8.3≥ 8.3.0, < 8.3.88.3.8
8.2≥ 8.2.0, < 8.2.208.2.20
8.1≥ 8.1.0, < 8.1.298.1.29
8.1< 8.1.298.1.29
Php group php
BranchAffectedFixed in
8.3≥ 8.3.0, < 8.3.88.3.8
8.2≥ 8.2.0, < 8.2.208.2.20
8.1≥ 8.1.0, < 8.1.298.1.29
Fedoraproject fedora
BranchAffectedFixed in
39.x= 39no fix published
40.x= 40no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As php, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • PHP Group PHPother versions: affected

    https://github.com/php/php-srcplatforms: Windows

    Affected
    • ≥ 8.1.*, < 8.1.29fixed in 8.1.29semver
    • ≥ 8.2.*, < 8.2.20fixed in 8.2.20semver
    • ≥ 8.3.*, < 8.3.8fixed in 8.3.8semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-06-21

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • phpAzure Linux:3all versions · fixed in 8.3.8-1
  • phpAzure Linux:2all versions · fixed in 8.1.29-1
  • php-7.2Echoall versions · fixed in 7.2.34+e1
  • php-8.1Wolfiall versions · fixed in 8.1.29-r0
  • php-8.1Chainguardall versions · fixed in 8.1.29-r0
  • php-8.2Wolfiall versions · fixed in 8.2.20-r0
  • php-8.2Chainguardall versions · fixed in 8.2.20-r0
  • php8openSUSE:Tumbleweedall versions · fixed in 8.3.12-1.1

3 more package ranges on OSV.dev

Vendor advisories

  • CVE-2024-4577 Red Hat Product Security

    php: Argument Injection in PHP-CGI

Full record on NVD

Fix

  1. Update PHP to 8.3.8 · 8.2.20 · 8.1.29
  2. CISA’s required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.due 2024-07-03

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
available
ProjectDiscovery
Exploit-DB
EDB-52331
Exploit-DB
Metasploit modules
1 moduleexploit/windows/http/php_cgi_arg_injection_rce_cve_2024_4577rank: excellentModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause.
Metasploit Framework

CISA Known Exploited Vulnerability

Date Added
2024-06-12
Patch Due Date
2024-07-03
Ransomware Use
Known
Required Action
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2024-06-09
Last Modified
2026-06-17
NVD status
Analyzed

Frequently asked questions

What is CVE-2024-4577?

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.

Is CVE-2024-4577 actively exploited?

Yes. CVE-2024-4577 is on the CISA Known Exploited Vulnerabilities (KEV) catalog, meaning it has been confirmed as actively exploited in the wild. CISA requires federal agencies to patch by 2024-07-03.

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

CVE-2024-4577 has a CVSS v3 base score of 9.8 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record