PHP CGI Flaw CVE-2024-4577 Exploited to Deploy TellYouThePass Ransomware

· Original article ↗

Summary

CVE-2024-4577 enables unauthenticated remote code execution in vulnerable Windows PHP CGI setups. TellYouThePass reportedly exploited it after patches were released; users are advised to update or apply temporary mitigations.

Key points

  • The flaw uses Windows encoding conversion’s Best-Fit behavior to bypass protections against argument injection and execute code remotely.
  • Affected versions are PHP 8.3 before 8.3.8, 8.2 before 8.2.20, and 8.1 before 8.1.29; PHP 8.0, 7, and 5 are also considered vulnerable and are end-of-life.
  • The article says exploitation was demonstrated on Windows systems using Traditional Chinese, Simplified Chinese, and Japanese locales; it reports no known exploitation for English and Western European locales.
  • Wiz data indicated that 34% of cloud environments had Windows resources running vulnerable PHP versions.
  • TellYouThePass reportedly began exploiting the flaw on June 8, 2024, using public exploit code to deploy webshells and ransomware.
  • The reported attack chain uses mshta.exe to run an HTA containing VBScript, loads a .NET ransomware variant into memory, communicates with a command-and-control server, and encrypts files.
  • Users should upgrade to a patched PHP version. The article also describes temporary rewrite rules for specified locales and recommends disabling PHP CGI in XAMPP if it is not needed.

Article Details

Vulnerability Types
  • Argument injection
Severity
Critical
Affected Versions
  • PHP 8.3 before 8.3.8
  • PHP 8.2 before 8.2.20
  • PHP 8.1 before 8.1.29
  • PHP 8.0
  • PHP 7
  • PHP 5
Exploitation Status
active
Exploit Availability
public_exploit
Patch Status
available
Workarounds
  • Apply the provided Rewrite Rules as a temporary mitigation for Traditional Chinese, Simplified Chinese, and Japanese locales.
  • XAMPP users who do not need PHP CGI should disable the feature by commenting out the relevant ScriptAlias line in the Apache HTTP Server configuration.

MITRE ATT&CK

CVE

Threat Actors

Products

Tools

Related Articles