AW Dev Rethought Flash: Hackers Are Exploiting WP Rocket on WordPress Sites
Attackers are exploiting a critical flaw in WP Rocket, one of the most popular performance plugins for WordPress. It lets them run their own code on a site's server without logging in.
The flaw, CVE-2026-125812, is rated 9.8 out of 10 by Patchstack. A fix has been available since November 19, but attacks began on November 25 against sites that haven't updated. WP Rocket's developer, WP Media, says the plugin runs on more than 5.6 million sites.
Who Is Affected
According to WP Rocket's own advisory, the flaw affects versions 3.15 through 3.24.1 on sites where at least one of two features is turned on:
- LazyLoad for CSS background images
- Self-host Google Fonts
Both are off by default. Patchstack notes they're common on sites tuned for speed, which is exactly the kind of site that installs WP Rocket in the first place.
The fix is version 3.24.2, released on November 19.
How the Attack Works
WP Rocket saves optimised copies of CSS and font files to disk. To decide where to save them, it builds a file path from part of a web address.
Before 3.24.2, it didn't check that the resulting path stayed inside its cache folder. A crafted address containing ../segments can climb out of that folder. Patchstack says an unauthenticated attacker can use this to write PHP code downloaded from an external source, and then run it.
A caching plugin's job is to write files. This bug let attackers choose where, and what.
The 3.24.2 changelog describes the fix only as improved "validation of cached CSS, font and preconnect files."
The Timeline
- November 4: The flaw is reported through Patchstack's bug bounty programme.
- November 19: WP Media releases the fix in WP Rocket 3.24.2.
- November 23: Patchstack discloses the flaw publicly.
- November 25, 15:27 UTC: Patchstack sees the first manual exploitation attempts, which then escalate into fully automated campaigns.
Patchstack says it has blocked more than 25,000 malicious requests. Blocked attempts aren't the same as confirmed compromises, and no victim count has been published. As of November 28, the flaw was not in CISA's Known Exploited Vulnerabilities catalog.
The attacks also landed in the week of Black Friday, when online shops are busiest and least likely to touch their sites.
What to Do
1. Check your version. In WordPress, go to Plugins and find WP Rocket. Anything from 3.15 to 3.24.1 needs action.
2. Update to 3.24.2 or later. WP Rocket is a paid plugin, so updates need an active licence.
3. Can't update yet? Turn off both features. WP Rocket says switching off LazyLoad for CSS background images and Self-host Google Fonts blocks the documented attack paths immediately. Keep them off until you update.
4. Check for files you didn't put there. Updating doesn't remove code an attacker has already planted. If your site ran an affected version with either feature on after November 25, look for unfamiliar PHP files, especially around WP Rocket's cache folders, and review recently created admin accounts.
Enjoyed this post?
Stay in the loop
New posts + weekly digest, straight to your inbox.
Create a free account
- Save posts to your vault
- Like posts & build history
- New-post alerts
No comments yet. Be the first to comment!