Get started

WP Rocket vulnerability under attack: how to patch CVE-2026-125812 and check your site

A critical flaw in WP Rocket lets attackers run code on WordPress sites without logging in, and it is being exploited. Update to 3.24.2, or switch off two settings, then check for signs of attack.

6 December 2026 · 5 min read

WP Rocket, one of the most widely used caching plugins for WordPress, has a critical vulnerability that attackers are exploiting right now. Tracked as CVE-2026-125812, it lets someone with no login write a PHP file to your site and run it. That is full control of the website.

The fix is already out: WP Rocket 3.24.2, released on 19 November 2026. If WP Rocket is on your site, check the version today. This guide shows how to update, what to do if you cannot, and how to look for signs that someone got in before you patched.

Who is affected

According to WP Rocket’s security advisory, a site is vulnerable when both of these are true:

  • It runs WP Rocket 3.15 through 3.24.1.
  • At least one of two features is switched on: LazyLoad for CSS background images, or Self-host Google Fonts (Patchstack calls it Host Fonts Locally).

Patchstack, which reported the attacks, rates the flaw 9.8 out of 10 (critical). Both features are off by default, but both are common on sites that have been tuned for speed. If you are not sure whether they are on, assume they are until you have checked.

How the attack works

Patchstack’s write-up explains that WP Rocket runs a small script in visitors’ browsers that measures each page and reports back to a public AJAX endpoint (admin-ajax.php with action=rocket_beacon). WP Rocket did not validate the reported URLs strictly enough. A crafted report can make the site download content from the attacker’s server and save it as a PHP file, which then runs.

Patchstack saw the first exploitation attempt on 25 November 2026, and within a day the activity had turned into automated campaigns hitting sites one after another.

Step 1: update WP Rocket to 3.24.2 or later

With an active licence:

  1. In WordPress, go to Plugins.
  2. Find WP Rocket and click Update now.
  3. Confirm the version shown is 3.24.2 or later.

If you manage sites over SSH with WP-CLI, check and update from the site’s folder:

wp plugin get wp-rocket --field=version
wp plugin update wp-rocket

WP Rocket is a paid plugin, so if no update appears, the licence key may have expired or the site may not be connected to your WP Rocket account. WP Rocket’s update guide covers that case.

Step 2: if you cannot update yet, turn the two features off

WP Rocket says that switching off both features blocks the documented attack paths immediately:

  1. Open WP Rocket » Page Optimization » Image & Media (on versions before 3.24, the Media tab).
  2. Untick LazyLoad for CSS background images and Self-host Google Fonts.
  3. Save, and check that both settings are really off.

Keep them off until the site runs 3.24.2 or later. For agencies and hosts, WP Rocket also offers a small helper plugin that turns both features off and can be installed in bulk with WP-CLI. On multisite, it must be activated on each affected subsite.

Step 3: check whether the site was attacked

Updating stops new attacks, but it does not remove files an attacker already planted. If either feature was on while the site ran a vulnerable version, check it. Patchstack lists these signs:

  • Unexpected PHP files in wp-content/wp-rocket-config/, wp-content/uploads/ or directly in wp-content/, for example files named wp-media-*.php.
  • Outbound requests from your web server to unfamiliar hosts, nip.io names or trycloudflare.com tunnels.
  • rocket_beacon requests from clients that never loaded the page they report on.

Over SSH, from the WordPress folder, these commands list PHP files in the places Patchstack mentions, newest first:

find wp-content -maxdepth 1 -name '*.php' -newermt '2026-11-20' -ls
find wp-content/uploads wp-content/wp-rocket-config -name '*.php' -newermt '2026-11-20' -ls
find wp-content -name 'wp-media-*.php' -ls

A WordPress uploads folder holds images and documents, so a PHP file there deserves a close look. Do not just delete what you find and move on: an attacker with code execution may have left more than one way back in, such as extra admin users or changed core files. Check Users for admin accounts you did not create, and compare core files with a fresh copy, for example with wp core verify-checksums.

Access logs help too. In cPanel » Metrics » Raw Access, look for bursts of POST /wp-admin/admin-ajax.php from addresses you do not recognise. The action value is usually sent in the request body, so it will not always appear in the log line itself.

If you find signs of compromise

  • Take a copy of the site and logs as they are, for investigation.
  • Restore from a backup taken before the first suspicious file, then update WP Rocket straight away. On cPanel, our guide to restoring a backup from JetBackup 5 shows how.
  • Change every password: WordPress admins, the database user in wp-config.php, cPanel, FTP and SFTP. Then replace the security keys and salts in wp-config.php so existing logins are logged out.

Frequently asked questions

Which WP Rocket version fixes CVE-2026-125812?

WP Rocket 3.24.2, released on 19 November 2026. Any later version also includes the fix.

Is my site safe if LazyLoad for CSS background images is off?

Only if Self-host Google Fonts is off too. Either feature on a version from 3.15 to 3.24.1 makes the site vulnerable. Updating is the real fix.

My WP Rocket licence has expired. What should I do?

Turn off both features now, then renew and update. WP Rocket’s advisory recommends exactly that order.

Does updating remove malware that was already added?

No. The update prevents new attacks through this flaw, but planted files and accounts must be found and removed separately.

Are other caching plugins affected?

This CVE is specific to WP Rocket. Keep every plugin updated, and remove plugins you no longer use.

Need help checking your site?

If you think your site was hit, our website emergency room offers a hacked website clean-up: malware and backdoors removed, passwords and keys changed, and a report of what was found. On our WordPress hosting, daily backups give you a clean restore point, and if you are moving off WP Rocket, our guide to LiteSpeed Cache for WordPress covers the free caching plugin that works with our LiteSpeed servers.

Tags:

WP Rocket vulnerability

CVE-2026-125812

WP Rocket 3.24.2

WordPress plugin security

hacked WordPress site

WordPress Guide

How to enable LiteSpeed Cache for WordPress, and what NVMe storage actually is

Set up the LiteSpeed Cache plugin on a LiteSpeed server and check that pages are being cached.

Read More →

WordPress Guide

WordPress 7.2 arrives on 8 December: how to update safely in cPanel

What changes in WordPress 7.2, whether your site will update itself, and how to test on a staging copy first.

Read More →