This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

✨ Vultr and Linode are back on Cloudways! VIEW PLANS→

PHP Addresses Critical RCE Flaw Potentially Impacting Millions of Servers

Updated on June 10, 2024

2 Min Read
PHP Addresses Critical RCE Flaw

A critical remote code execution (RCE) vulnerability has been discovered in PHP for Windows, affecting version 5.x and earlier, potentially impacting millions of servers globally. Researchers at cybersecurity firm DEVCORE identified the flaw, tracked as CVE-2024-4577.

via GIPHY

This vulnerability allows an unauthenticated attacker to take full control of affected servers. PHP, an open-source scripting language widely used for web development, has flaws in its implementation.

The oversight in the Best-Fit feature of encoding conversion within the Windows operating system allows attackers to bypass the previous protection of CVE-2012-1823 using specific character sequences. Consequently, arbitrary code can be executed on remote PHP servers through an argument injection attack.

DEVCORE’s advisory explains, “While implementing PHP, the team did not notice the Best-Fit feature of encoding conversion within the Windows operating system. This oversight allows unauthenticated attackers to bypass the previous protection of CVE-2012-1823 by specific character sequences. Arbitrary code can be executed on remote PHP servers through the argument injection attack.”

The vulnerability CVE-2024-4577 was reported to the PHP development team by DEVCORE researcher Orange Tsai on May 7, 2024. A patch was released on June 6, 2024.

Since the disclosure and the availability of a PoC exploit code, multiple actors have attempted to exploit the flaw, as reported by researchers from Shadowserver and GreyNoise. Shadowserver observed multiple IPs testing the vulnerability against its honeypot sensors starting on June 7th, while GreyNoise reported malicious exploitation attempts.

via GIPHY

The advisory further notes, “As of this writing, it has been verified that when Windows is running in the following locales, an unauthorized attacker can directly execute arbitrary code on the remote server: Traditional Chinese (Code Page 950), Simplified Chinese (Code Page 936), and Japanese (Code Page 932).

For Windows running in other locales, such as English, Korean, and Western European, it is currently impossible to completely enumerate and eliminate all potential exploitation scenarios. Therefore, it is recommended that users conduct a comprehensive asset assessment, verify their usage scenarios, and update PHP to the latest version to ensure security.”

XAMPP users are particularly vulnerable due to a default configuration that exposes the PHP binary. Although XAMPP has not yet released an update, DEVCORE provided mitigation instructions. Administrators should apply a mod_rewrite rule to block attacks:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^%ad [NC]

RewriteRule .? – [F,L]

XAMPP users should also find the ‘ScriptAlias‘ directive in the Apache configuration file (C:/xampp/apache/conf/extra/httpd-xampp.conf) and comment it out.

The advisory concludes, “It is strongly recommended that all users upgrade to the latest PHP versions of 8.3.8, 8.2.20, and 8.1.29. However, since PHP CGI is an outdated and problematic architecture, it’s still recommended to evaluate the possibility of migrating to a more secure architecture such as Mod-PHP, FastCGI, or PHP-FPM.”

Organizations should promptly update their PHP installations and adopt more secure architectures to mitigate potential threats.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Start Growing with Cloudways Today.

Our Clients Love us because we never compromise on these

Abdul Rehman

Abdul is a tech-savvy, coffee-fueled, and creatively driven marketer who loves keeping up with the latest software updates and tech gadgets. He's also a skilled technical writer who can explain complex concepts simply for a broad audience. Abdul enjoys sharing his knowledge of the Cloud industry through user manuals, documentation, and blog posts.

×

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now