WP Rocket's update closes the hole. It does not remove the files attackers already planted (CVE-2026-125812)

5 min read

How to fix CVE-2026-125812: upgrade WP Rocket to 3.24.2 or later. The update stops new attacks, and it does not remove a PHP file an attacker already planted, so check wp-content, wp-content/uploads and wp-content/wp-rocket-config for files you do not recognize.

On this page

Attackers have been working through WordPress sites that run WP Rocket since November 25. Someone with no account on the site can force it to download a file from a server the attacker runs and save the file as PHP code. Once that code runs on the site, the attacker controls the site.

WP Rocket is a paid caching plugin, and Patchstack puts it on more than 5.5 million WordPress sites. The flaw, CVE-2026-125812, scores 9.8 on CVSS 3.1 and is rated Critical. WP Rocket fixed it in version 3.24.2 on November 19, 2026, six days before Patchstack saw the first exploitation attempt. Sites updated in that time frame closed the hole pre-attacks. Sites that did not are being scanned and hit in bulk.

How the attack works

WP Rocket runs a small script in the browser of each visitor. The script measures the page and sends the results to a public endpoint on the site, wp-admin/admin-ajax.php, with the action rocket_beacon. The plugin then uses the URLs contained in those reports to optimize the page. WP Rocket did not do enough checks of the reported urls. An attacker-chosen address can be targeted by a cleverly constructed report, the site then downloads whatever is there and stores it in an executable PHP file.

Two features can be abused this way: LazyLoad for CSS background images, and Host Fonts Locally, which WP Rocket's own advisory calls Self-host Google Fonts. It's path traversal. Classed as CWE-22. One attack request will send both feature paths. The request will hit one path depending on which feature the site is using.

Who is in scope, and who is not

A site is exposed when it runs WP Rocket 3.15 through 3.24.1 and has at least one of those two features enabled. Both are off by default. Both are also common on performance-tuned sites, which is the audience that buys a caching plugin in the first place.

3.24.2+ sites are patched. For vulnerable version with both features disabled, there are no known entry points into site. This is irrelevant to any site that doesn't use WP Rocket. This is not a WordPress core flaw, and it is not a flaw in every WP Rocket install.

What the campaigns look like

Patchstack recorded the first attempt on November 25, 2026 at 15:27 UTC. The first attacker worked by hand, testing a payload against a few sites and retrying with encoded variants when a request was blocked. Within one day the attacks turned automated, with tens of thousands of blocked attempts on November 26 alone. There are multiple operators running campaigns. One cluster sent byte-identical requests from four residential addresses, which points to a rotating proxy pool. Payloads sit on bare IP addresses, on wildcard DNS names such as nip.io subdomains, on temporary trycloudflare.com tunnels, and on other WordPress sites that look compromised already.

Check for planted files before anything else

The update stops new attacks. It does not remove a PHP file an attacker already saved, and WP Rocket's own advisory says the same in plainer terms: an update prevents new exploitation, and any files or accounts an attacker already created need a separate investigation. If a site ran a vulnerable version with either feature on between November 25 and the day it updated, check these places:

  • Check in wp-content/, wp-content/uploads/ and wp-content/wp-rocket-config/ to see if you have any PHP files you're not familiar with. Patchstack names wp-media-*.php as one example of the planted file pattern. A quick sweep from the WordPress root: find wp-content -name "wp-media-*.php", then widen it to any .php file in those three folders whose date falls in the exposure window.
  • Search the access logs for rocket_beacon requests. Look hardest at requests from visitors who never loaded the page they report on, and at reports that carry full URLs where WP Rocket expects bare domains.
  • Check for outbound requests from the web server to hosts nobody on the team can name, especially bare IP addresses, nip.io names and trycloudflare.com tunnels.

A planted file that survives the update is a working back door. Finding one means the site was breached, and cleaning it up is a bigger job than deleting the file: passwords, salts and admin accounts all need review.

How to fix

Update your WP Rocket to 3.24.2 or newer. In the WordPress dashboard that is Plugins, find WP Rocket, Update now, then confirm the installed version reads 3.24.2 or later.

If a license has expired or the update cannot go in yet, turn both features off: WP Rocket, Page Optimization, Image & Media (the Media tab on versions before 3.24), and switch off LazyLoad for CSS background images and Self-host Google Fonts. WP Rocket has a free mitigation helper plugin that changes both settings across multiple sites at the same time (and hosts/agencies can deploy via wp-cli). Keep both settings off until 3.24.2 or later is installed.

Then you should run the above file check in that order. Patch first so nothing new lands, then hunt, because the hunt is the part the update does not do for you.

HOL's assessment

The measuring script actually chose the server files to be downloaded and saved as code. That is the shape to watch for in any plugin: a feature that fetches an address a visitor supplies, with no strict check on the address first. The data record for this issue can be found at the HOL Guard evidence page for CVE-2026-125812 with its data sources.

Where to download Guard

Guard is free and Open source. Guard Desktop downloads from https://hol.org/guard/install for macOS 13+ on Apple silicon, Windows x64 and Linux x86_64, and the download needs no terminal. Same page has a one-line terminal install too. Once you've installed, run the hol-guard doctor to verify the daemon is up and the intercept layer is working.

References

WP Rocket security advisory and mitigation steps for CVE-2026-125812, wp-rocket.me.

Patchstack, Critical WP Rocket RCE (CVE-2026-125812) under active attack, patchstack.com, November 27, 2026.

CVE-2026-125812 record, cve.org.

All articles

Keep exploring

The engineering desk continues across the ecosystem: security research on shipping agents safely, and plugins that put the standards to work.