LEFTEROS / PERSONAL NOTES
WP Rocket under active attack: when a caching plugin becomes a way into the server
27 November 2026 / Lefteris Iliadis / SomniusX

We install a caching plugin to make a site faster, and we tend to think of it as harmless plumbing. It doesn't handle payments or logins. But to do its job it reads requests, fetches resources, and writes files on the server. That last part is what went wrong in WP Rocket.
CVE-2026-125812 is an unauthenticated remote code execution: anyone, with no account, can make an affected site write PHP code and run it. Patchstack rates it CVSS 9.8 and reports that it's being exploited in the wild. WP Rocket fixed it in 3.24.2, released on 19 November. The first attack Patchstack saw came on 25 November at 15:27 UTC. Six days.
Is my site affected?
Two conditions, both needed:
- The version. WP Rocket's advisory says 3.15 through 3.24.1. Patchstack writes "before 3.24.2". In practice: 3.15 up to anything below 3.24.2.
- At least one of two features turned on: LazyLoad for CSS background images, or Self-host Google Fonts (Patchstack calls it "Host Fonts Locally"). Patchstack notes both are off by default, but common on sites that have been tuned for speed.

To check the version from the command line on a server with WP-CLI:
wp plugin get wp-rocket --field=version
The two settings are under WP Rocket → Page Optimization → Image & Media (on versions before 3.24, the Media tab).
How the attack works
From Patchstack's write-up: WP Rocket runs a small script in each visitor's browser that measures the page and reports back to a public AJAX endpoint. WP Rocket then uses the reported URLs to optimise the page. Those URLs weren't validated strictly enough. A crafted report makes the site download content from the attacker's server and save it as a PHP file. The attacker's code then runs on the server.

All the attempts Patchstack sees go to the same place:
POST /wp-admin/admin-ajax.php
action=rocket_beacon
The first attacker worked by hand on 25 November. By the next day there were automated campaigns, with tens of thousands of blocked attempts on 26 November alone, from several independent operators. Some send both feature paths in one request, so whichever feature you have on, one of them fires. Payloads are hosted on bare IP addresses, wildcard DNS names like nip.io, temporary trycloudflare.com tunnels, and other WordPress sites that are probably compromised themselves.

What to do
If you can update: Plugins → WP Rocket → Update now, and confirm you're on 3.24.2 or later. With WP-CLI: wp plugin update wp-rocket.
If the licence has expired or you can't update yet: turn off both LazyLoad for CSS background images and Self-host Google Fonts, save, and check that both are off. WP Rocket says this blocks the documented attack paths immediately. Keep them off until you're on 3.24.2. You lose a bit of optimisation; you keep the server.
If you manage many sites: WP Rocket published a helper plugin that turns off the two features. Hosting providers and agencies can push it out with WP-CLI:
wp plugin install ./wp-rocket-mitigate-cve-2026-125812.zip --activate
On Multisite, install it once and activate it on each affected subsite:
wp plugin activate wp-rocket-mitigate-cve-2026-125812 --url=https://example.com/subsite/
Then check that both settings really are off on every site, and still plan the update.
Updating doesn't clean up
This is the part people skip. The update and the workaround stop new attacks. They don't remove anything an attacker already planted. If a site ran a vulnerable version with either feature on, especially after 25 November, assume it may have been hit and check.
From Patchstack's detection notes:
Unexpected PHP files in
wp-content/wp-rocket-config/,wp-content/uploads/or directly inwp-content/, for examplewp-media-*.php. A quick first look:find wp-content/uploads wp-content/wp-rocket-config -name '*.php' -newermt 2026-11-19 -ls find wp-content -maxdepth 1 -name '*.php' -newermt 2026-11-19 -lsRun them from the WordPress root. The 19 November cut-off is the fix date, an early margin on purpose (the first attack Patchstack saw was on 25 November). WP Rocket's own config file for your domain in
wp-rocket-config/is expected and changes when you save settings; anything else there, or content in it you don't recognise, is not.(A file's date can be faked, so a clean result is a start, not a verdict.)
rocket_beaconrequests in the access logs from clients that never loaded the page they report on, or that report full URLs where WP Rocket expects bare domains.Outbound requests from the web server to unfamiliar hosts,
nip.ionames ortrycloudflare.comtunnels.
If you find something, it's an incident, not a clean-up: new admin users, changed files outside those folders, cron jobs and database changes all need looking at, and passwords and keys stored on the server should be changed. WP Rocket's own advice is the same: ask your host or security team to check for compromise, because files or accounts an attacker already created need separate investigation.
The lesson for "harmless" plugins
When we judge a plugin's risk we usually ask what it does for the business. A better question is what it does on the server. Does it fetch remote content? Does it write files into a folder the web server will execute? Does it expose a public endpoint? A performance plugin can answer yes to all three. That puts it in the same risk class as a file manager, whatever it says on the box.
For agencies and hosts the practical steps are boring and work: an inventory of which plugin versions run on which sites, automatic updates for security releases where you can, and PHP execution disabled in wp-content/uploads/ at the web server level, which takes away at least one of the folders where Patchstack says to look for planted files.
Sources: WP Rocket security advisory, Patchstack (27 November 2026), CVE record.