Skip to main content
VulnerabilityPublished Updated

CVE-2024-4577: PHP · OS Command Injection

Affects PHPSource CVE Database V5

0
Compare

Exploited in the wild · used in ransomware campaigns · KEV due 3 Jul 2024 · public exploit available (Metasploit, Exploit-DB) · 94% EPSS · fixed in 8.4.0 : patch PHP now.

Data as of 30 Nov 2026, 18:35 UTC

CVSS 3.1 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
KEV deadline
 US federal agencies must patch by this date; a sensible deadline for everyone else. Other KEV due dates
Ransomware
Used in ransomware campaigns
EPSS
94.8% chance of exploitation in 30 days – higher than 99% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 8.4.0, 8.3.8, 8.3.0 +3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

t = 0 is the CVE’s publication on cve.org

  1. Disclosed: evidence found.

    CVE published 9 Jun 2024

  2. Exploited in the wild: evidence found.

    Listed in CISA KEV 3 days after disclosure

  3. Observed by OffSeq Mirage: evidence found.

    185 honeypot hits, first 2.4 years after disclosure

Timeline

  1. CVE ID reserved

    by PHP Group

    , 34 days before disclosure

  2. CVE published

    on cve.org

    , t = 0

  3. Added to CISA KEV (opens in a new tab)

    exploitation confirmed · ransomware use known

    , 3 days after disclosure

  4. First Exploit-DB entry (opens in a new tab)

    PHP < 8.3.8 - Unauthenticated Remote Code Execution (RCE) (Windows) +1 more

    , 5 days after disclosure

  5. KEV remediation due

    US federal deadline

    , 24 days after disclosure

  6. First seen by OffSeq Mirage

    from 37 attacker networks; activity in Germany, Canada, United Kingdom, United States and 6 more

    , 2.4 years after disclosure

  7. , 2.5 years after disclosure

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CISA KEV (opens in a new tab), OffSeq Mirage (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Nov 2026.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
PHP Group PHPAffected
  • >=8.1.0 <8.2.0
  • >=8.2.0 <8.3.0
  • >=8.3.0 <8.4.0
  • >=8.1.0 <8.1.29
  • >=8.2.0 <8.2.20
  • >=8.3.0 <8.3.8
Fixed in
  • 8.2.0
  • 8.3.0
  • 8.4.0
  • 8.1.29
  • 8.2.20
  • 8.3.8

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.

References

Community reviews

Loading reviews…