An urgent security flaw has been identified in the WP Rocket plugin, designated as CVE-2026-125812 with a critical severity score of 9.8. This vulnerability enables unauthorized attackers to insert and execute harmful PHP code on WordPress sites using vulnerable versions of the plugin.
Immediate Update Recommended
Administrators of WordPress sites are strongly advised to update their WP Rocket plugin to version 3.24.2 or newer. This update is necessary even if there have been no apparent signs of exploitation. The flaw is present in WP Rocket versions 3.15 to 3.24.1 when either the LazyLoad for CSS background images or Host Fonts Locally options are activated, both of which are disabled by default. The patch was released on November 19, 2026, to address these issues.
Understanding the Vulnerability
WP Rocket optimizes website performance by gathering page metrics from visitors’ browsers. However, Patchstack discovered that the plugin failed to adequately validate some of this data, allowing attackers to perform remote code execution without needing a WordPress login. This security gap can be exploited by inserting and executing PHP scripts on the server.
Recorded Exploitation Attempts
Patchstack documented the first attempt to exploit this vulnerability on November 25, just days after the patch was issued. Initially, these attempts were manual, but they quickly evolved into automated attacks. The following day, thousands of malicious requests were blocked. Notably, the report does not specify how many sites were compromised in these attacks.
High levels of activity were observed from specific IP addresses, with notable sources including Ikubaru in Indonesia and DigitalOcean. These attempts highlight the urgency for site administrators to update their plugins and implement protective measures.
Protecting Your Site
For those unable to update immediately, it is advised to disable both the LazyLoad for CSS background images and Host Fonts Locally settings. Patchstack’s RapidMitigate rule, which was active over two days before the first attack, can provide temporary protection. However, applying the update remains the most effective solution to secure your site.
Even after updating, it is essential to review server logs and inspect for any unauthorized PHP files, especially within the wp-content/uploads/ and wp-content/wp-rocket-config/ directories. Suspicious files like wp-media-*.php should be preserved and investigated by your hosting provider or incident response team to ensure comprehensive security.
