Itdaily - Hackers exploit critical flaw in WordPress plugin WP Rocket

Hackers exploit critical flaw in WordPress plugin WP Rocket

Red warning symbol with a triangle over a grid of red and white binary code.

Attackers are actively exploiting a critical vulnerability in the WordPress plugin WP Rocket to run PHP code on websites without logging in. An update is available.

Hackers have been exploiting a critical vulnerability in WP Rocket, the WordPress caching plugin from WP Media, since 25 November. The flaw, known as CVE-2026-125812, affects all versions of the plugin before 3.24.2 and has a CVSS score of 9.8 out of 10. Security company Patchstack saw the first attack on 25 November at 3.27 pm UTC.

Researcher Vorelito found the flaw through Patchstack’s bug bounty program, which disclosed the vulnerability on 23 November. According to Patchstack, WP Rocket has more than 5.5 million installations.

Flaw in the measurement script

WP Rocket runs a small script in visitors’ browsers that measures each page and sends the results to a public AJAX endpoint. The plugin then uses the reported URLs to optimise the page. WP Rocket does not check those URLs strictly enough. With a manipulated measurement report, an attacker can make the site download content from their own server and save it as a PHP file, after which that code runs on the server. No account is needed for this.

A site is only vulnerable if the option “LazyLoad for CSS background images” or “Host Fonts Locally” is enabled. “Both features are off by default, but they are common on sites tuned for speed,” writes Dave Jong, Security Research Lead at Patchstack. The attackers send requests through both features, sometimes in a single request, so that one of the two always hits.

Tens of thousands of attempts in one day

The first attacker still worked by hand. He tried his code on a few sites and sent encoded variants when his first attempt was blocked. Within a day, automated campaigns were running. On 26 November, Patchstack blocked tens of thousands of attempts alone.

According to Patchstack, several attackers are active independently of each other. Some send the same code to site after site. One group sent identical requests from four residential IP addresses, which points to a rotating pool of proxies. The ten most active IP addresses, which Patchstack published, accounted for about half of all blocked attempts.

The attackers stage their code on bare IP addresses, on wildcard DNS names such as nip.io, in temporary tunnels via trycloudflare.com and on other WordPress sites that have presumably already been compromised.

Update to WP Rocket 3.24.2

Version 3.24.2 of WP Rocket closes the flaw. Those who cannot update right away should disable the two vulnerable options.

An update does not remove files that attackers have already planted. Administrators of sites that ran a vulnerable version are therefore best advised to check the folders wp-content/wp-rocket-config/, wp-content/uploads/ and wp-content/ for unexpected PHP files, such as wp-media-*.php. Patchstack also recommends reviewing older logs for outgoing traffic to unknown servers.