PHP CGI Module Vulnerability Allows Malicious User to Reveal Source Code and Run Arbitrary PHP Code on Server

CVE-2024-4577
9.8CRITICAL

Key Information

Vendor
PHP Group
Status
PHP
Vendor
CVE Published:
9 June 2024

Badges

🔥 No. 1 Trending😄 Trended👾 Exploit Exists🔴 Public PoC🟣 EPSS 96%📰 News Worthy

Summary

The vulnerability, identified as CVE-2024-4577, affects PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8 when using Apache and PHP-CGI on Windows. It allows unauthenticated attackers to bypass protections and execute arbitrary code on remote PHP servers through an argument injection attack. The flaw in the Best-Fit feature of Windows' encoding conversion enables attackers to reveal source code, run arbitrary PHP code on the server, and potentially execute malicious activities. The affected PHP versions are 8.3 < 8.3.8, 8.2 < 8.2.20, and 8.1 < 8.1.29, and the vulnerability particularly threatens servers running PHP on Windows in Traditional Chinese, Simplified Chinese, and Japanese locales. Exploiting this vulnerability can allow attackers to execute arbitrary code through the PHP interpreter, posing a widespread threat to server administrators. Researchers advise immediate action by evaluating systems and implementing the recommended patches or upgrading to the latest PHP versions. Additionally, administrators should consider moving away from CGI altogether and opting for more modern solutions such as Mod-PHP, FastCGI, or PHP-FPM. It is important to note that this vulnerability is actively being exploited, and the recommended patches should be implemented promptly to mitigate this critical risk.

CISA Reported

CISA provides regional cyber and physical services to support security and resilience across the United States. CISA monitor the most dangerious vulnerabilities and have identifed CVE-2024-4577 as being exploited and is known by the CISA as enabling ransomware campaigns.

The CISA's recommendation is: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.

Affected Version(s)

PHP <= 8.1.*

PHP < 8.1.29

PHP < 8.2.20

Exploit Proof of Concept (PoC)

PoC code is written by security researchers to demonstrate the vulnerability can be exploited. PoC code is also a key component for weaponization which could lead to ransomware.

News Articles

EPSS Score

96% chance of being exploited in the next 30 days.

CVSS V3.1

Score:
9.8
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • 👾

    Exploit exists.

  • 🔥

    Vulnerability reached the number 1 worldwide trending spot.

  • Vulnerability started trending.

  • Vulnerability published.

  • First article discovered by Heise Online

  • Vulnerability Reserved.

Collectors

NVD DatabaseMitre DatabaseCISA Database9 Proof of Concept(s)36 News Article(s)

Credit

Orange Tsai, DEVCORE Research Team
.