📋 TL;DR — Last updated: November 30, 2026

  • WP Rocket 3.24.2 fixes CVE-2026-125812, rated 9.8 (Critical). Anyone, with no account, can make an unpatched WP Rocket save a file of their choosing as PHP that the site then runs.
  • A site is exposed only while “LazyLoad for CSS background images” or “Host Fonts Locally” is on. Both are off by default.
  • Attacks have been reported since November 25. On a site that was hit, the attacker’s files can sit anywhere under wp-content/, including mu-plugins/, and updating WP Rocket doesn’t remove them.
  • Imunify360’s web application firewall (WAF) blocks the exploit requests seen so far on Apache, LiteSpeed, nginx, and Coraza servers, and its malware scanner detects and removes the files the attackers plant.
  • Get every site onto WP Rocket 3.24.2 or later, then scan and check the sites that had either option on.

What CVE-2026-125812 does

WP Rocket is a caching plugin for WordPress. Two of its options make it fetch files from other servers and keep local copies: “LazyLoad for CSS background images” stores background stylesheets, and “Host Fonts Locally” stores font files.

In versions before 3.24.2, a visitor with no account can hand the plugin a URL of their own and get the result saved as a PHP file inside the site, which the site then runs, giving the attacker remote code execution without logging in. The flaw is tracked as CVE-2026-125812 and rated 9.8, Critical. WP Media fixed it in WP Rocket 3.24.2.

 

What the attacks leave behind

Exploitation has been reported since November 25. The first file is often a small probe or webshell, a script that runs whatever command it’s sent. From there the attackers add more:

  • webshells and backdoors under wp-content/ and wp-content/uploads/, with names such as wp-media- followed by eight hexadecimal characters and .php;
  • a file in wp-content/mu-plugins/, the must-use plugins folder that WordPress loads on every request, which re-creates the other files when they’re deleted;
  • an administrator account for the attacker.

Updating WP Rocket closes the hole but removes none of this.

 

What Imunify360 does

Imunify360’s server-level WAF blocks the exploit requests seen in these attacks on Apache, LiteSpeed, nginx, and Coraza servers, with the full or the minimized ruleset, and challenges the IP addresses that send them. It doesn’t replace the update.

The WAF blocks the first exploit request from an IP address before any file is written. If the same address keeps trying, it’s shown a challenge page, which a real browser passes and the exploit tool doesn’t. An address that sends exploit requests to enough Imunify360 servers is challenged on all of them. Other WAF rules block requests to the scripts the attackers plant.

Imunify360’s malware scanner detects the webshells, backdoors, and loaders these attacks drop as malicious, including the file in mu-plugins/ that re-creates the others, and its default action on a malicious file is to clean it up. New signatures reach servers automatically. ImunifyAV+ uses the same signatures and removes these files in one click.

 

What you should do

  1. Get every WP Rocket site onto 3.24.2 or later. Push the update where you manage the sites, and tell the customers who manage their own. Until a site is updated, turn off both “LazyLoad for CSS background images” and “Host Fonts Locally” on it. If you can’t tell which sites had either option on, treat every WP Rocket site as exposed.
  2. Update the signatures and scan. Run imunify360-agent update-sigs --force to get the newest signatures now, then scan the sites. With the default cleanup action, the scan removes the planted files, the loader in mu-plugins/ too.
  3. Remove accounts the attacker added, and end their sessions. Review the site’s users table in the database (wp_users by default, with their roles in wp_usermeta) for administrator accounts you didn’t create. Don’t list them with WP-CLI on an infected site, and never run it as root there: WP-CLI loads the site’s code, the attacker’s file in mu-plugins/ included, with the permissions it runs under (see The Hidden Risk: When WP Automation Executes Malware as Root). Delete the accounts you didn’t create, replace the salts in wp-config.php to log everyone out, and change the database password, since code running on the site could read it. If you’re in doubt, keep the logs and restore from a backup taken before the attacks began.
  4. Make sure the WAF blocks, with automatic ruleset updates. To check that it’s working, run the test request in the Imunify360 FAQ and look for its entry in /var/log/imunify360/console.log. Also make sure the Imunify360 dashboard doesn’t show the warning “ModSecurity works in “DetectionOnly” mode”. In that mode, ModSecurity logs these requests and lets them through.

Not on Imunify360? Get the two-week trial.