WP Rocket flaw CVE-2026-125812 is being used to plant code on WordPress sites: update to 3.24.2 now
Attackers are using a critical WP Rocket flaw to run their own code on WordPress sites. Update the plugin to 3.24.2 or later and check for planted files.
The short version
- Attackers have been exploiting CVE-2026-125812 in the WP Rocket plugin since November 25, 2026, to put their own PHP code on WordPress sites without logging in.
- WP Rocket versions before 3.24.2 are affected when LazyLoad for CSS background images or Host Fonts Locally is turned on.
- Update WP Rocket to 3.24.2 or later, then look for PHP files you didn't put there, such as wp-media-*.php.
- Affects
- WP Media WP Rocket (WordPress plugin)
- Being exploited
- Yes
- Flaw
- CVE-2026-125812
- Severity
- Critical
- Fixed in
- 3.24.2
- Record ID
- XC-FLAW-000004
WP Rocket, a widely used caching plugin for WordPress, has a critical flaw (CVE-2026-125812) that attackers are using to put their own PHP code on websites without logging in. It affects WP Rocket versions before 3.24.2, but only on sites with LazyLoad for CSS background images or Host Fonts Locally turned on. If your website runs WP Rocket, update it to 3.24.2 or later now, then check the site for files you didn't put there.
Patchstack, the security company that assigned the CVE, says it saw the first attack on November 25, 2026, and tens of thousands of blocked attempts the next day. WP Media, which makes WP Rocket, had already shipped the fix on November 19.

What's affected by the WP Rocket flaw?
| Plugin | WP Rocket by WP Media |
| Affected versions | Before 3.24.2 |
| Only when | LazyLoad for CSS background images or Host Fonts Locally is turned on |
| Fixed in | 3.24.2 (November 19, 2026). The newest version, 3.24.3, came out November 26 |
| Severity | 9.8 out of 10 (critical), rated by Patchstack |
| Being exploited | Yes, since November 25, 2026, according to Patchstack |
Patchstack says both settings are off by default but are common on sites that have been tuned for speed. The NVD record describes the flaw as a path traversal problem: the plugin didn't check the addresses it was sent closely enough. Patchstack says attackers send requests to the site's /wp-admin/admin-ajax.php address with action=rocket_beacon and point it at files on servers they control, so the site ends up holding and running the attacker's PHP code.
WP Rocket's changelog lists the fix in 3.24.2 as "Improve validation of cached CSS, font and preconnect files."
How do I know if my site uses WP Rocket?
If your business website runs on WordPress and you can sign in to it:
- Sign in to the WordPress dashboard and open Plugins.
- Find WP Rocket in the list. The version number shows under its name.
- If it says anything lower than 3.24.2, your site needs the update.
If a web designer, agency or hosting company looks after your site, ask them two things: is WP Rocket installed, and is it on 3.24.2 or later?
How do I update WP Rocket?
WP Rocket's own instructions:
- Go to the Plugins page in WordPress.
- Under the WP Rocket entry, click update now in the update notice. WP Rocket has to be active when you update it.
- If no notice appears, go to Dashboard > Updates and click Check Again.
- If it still doesn't appear, follow the manual update steps on WP Rocket's updating page.
After updating, go back to Plugins and check the version shows 3.24.2 or later.
What if I can't update WP Rocket yet?
Turn off both LazyLoad for CSS background images and Host Fonts Locally in WP Rocket's settings until you can update. Patchstack says the flaw can only be reached when one of them is on. Your pages may load a little slower in the meantime.
How do I check if my site was already hacked?
Updating stops new attacks, but Patchstack points out it doesn't remove anything an attacker already planted. If your site ran an older version with either setting on, have whoever manages the site (or your hosting company) check for:
- PHP files you don't recognize in
wp-content/,wp-content/uploads/orwp-content/wp-rocket-config/, such as files namedwp-media-*.php. - Requests in the web server logs to
/wp-admin/admin-ajax.phpwithaction=rocket_beaconfrom visitors that never loaded the page, or that include full web addresses where WP Rocket expects only a domain name. - Your web server connecting out to unfamiliar addresses,
nip.ionames ortrycloudflare.comaddresses. Patchstack says attackers hosted their files on those, on bare IP addresses and on other WordPress sites that were likely hacked.
Patchstack's advisory also lists the 10 IP addresses that sent the most attacks, which your host can search the logs for.
If something turns up, treat the site as hacked: ask your host for help cleaning it or restoring a backup from before November 25, and change the passwords for your WordPress admin accounts and your hosting account afterward.
What isn't known yet
- How many sites were broken into. Patchstack's numbers are blocked attempts, not successful hacks.
- The first affected version. The CVE record says only "before 3.24.2".
- A statement from WP Media. As of November 30, 2026, its changelog mentions the security fix but not the CVE or the attacks, and we found no separate security notice.
- CISA's list. The flaw wasn't on CISA's Known Exploited Vulnerabilities list when we checked on November 30. Don't wait for it: Patchstack has already seen attacks.
For other flaws attackers are using right now in equipment and software small offices run, see the SonicWall SSL VPN flaw, the Zyxel GS1900 switch flaw and our small business security hub.
Sources
Drafted with AI assistance from public sources, then checked and approved by Kevin Mercer, Head of Security Operations & Infrastructure on . See how we work, or tell us about a mistake at support@xcelcor.com.
More on Small business