News Security & Bugs

WP Rocket Flaw CVE-2026-125812 Under Attack: Update and Check Your Site

Attackers are exploiting a code execution flaw in WP Rocket before 3.24.2 on sites with two optional features enabled. How to check your version and settings, update, and look for planted PHP files.

A flaw in WP Rocket, the paid caching plugin for WordPress, lets a visitor with no account make the site download a file from the attacker's server and save it as PHP, which the attacker can then run. It is tracked as CVE-2026-125812 with a CVSS score of 9.8. The security company Patchstack, which issued the CVE, reports that attacks began on 25 November 2026 and became automated within a day.

The fix is in WP Rocket 3.24.2, released on 19 November 2026. The current version on 1 December is 3.24.3. Updating closes the hole but does not remove a file that was planted before the update, so a site that was exposed also needs a check.

What is confirmed

PointStatus on 1 December 2026
Affected versionsWP Rocket before 3.24.2, according to the CVE record
Condition"LazyLoad for CSS background images" or "Host Fonts Locally" is turned on. Both are off by default
Login neededNo
Fixed in3.24.2 (19 November 2026)
AttacksPatchstack saw the first attempt on 25 November at 15:27 UTC and "tens of thousands" of blocked attempts on 26 November
Reported byVorelito, through Patchstack's bug bounty programme, on 4 November 2026

Some reports say only versions 3.15 to 3.24.1 are affected. The CVE record gives no lower limit, and we could not confirm that range, so treat every version below 3.24.2 as affected. The attack figures come from Patchstack's own firewall data and describe the sites it protects, not the whole web.

WP Rocket's change log for 3.24.2 carries one short security line: "Improve validation of cached CSS, font and preconnect files". It does not mention the CVE or the attacks, so a site owner reading the change log alone would not see the urgency.

What goes wrong

Patchstack's analysis explains the mechanism. WP Rocket loads a small script in each visitor's browser that measures the page and sends the result back to the site through WordPress's public AJAX address, /wp-admin/admin-ajax.php, with the action name rocket_beacon. The plugin uses the URLs in that report to optimise the page. It did not check them strictly enough. A forged report can make the site fetch content from a server the attacker controls and store it as a .php file.

Two features use those reported URLs in a way that can be abused: lazy loading of CSS background images and local hosting of Google Fonts. A site with neither enabled does not take the vulnerable path, which is why the CVE does not apply to every WP Rocket install.

Check your version and settings

In the WordPress dashboard, the Plugins page shows the WP Rocket version. In the WP Rocket settings, look for the two options named above and note whether either is on. From the command line with WP-CLI, run as the site's user in the WordPress directory:

wp plugin get wp-rocket --field=version
wp option get wp_rocket_settings --format=json | tr ',' '\n' | grep -i -E "lazyload|font"

The second command lists the plugin's lazy-load and font settings; a value of 1 means on. We did not verify the exact setting names against the plugin's code, so confirm in the settings screen. If WP-CLI is new to you, see our WP-CLI guide.

Your situationWhat it means
3.24.2 or newer since before 25 NovemberNot exposed during the known attacks
Older version, both features off the whole timeNot on the vulnerable path; update anyway
Older version, one of the features on, at any time since 25 NovemberUpdate now and run the checks below

Update

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

Or use the update link on the Plugins page. WP Rocket is not in the WordPress.org directory; updates arrive through its own licence system. If no update is offered, download the current version from your WP Rocket account and upload it.

If you cannot update today, turn off both "LazyLoad for CSS background images" and "Host Fonts Locally" and save. This is the interim measure Patchstack gives. The site keeps working; those two optimisations stop until you turn them back on after the update.

Look for planted files

Patchstack lists where files from these attacks have been found: wp-content/wp-rocket-config/, wp-content/uploads/ and wp-content/ itself, with names such as wp-media-*.php. Run these from the WordPress directory:

# PHP files directly in wp-content
find wp-content -maxdepth 1 -name "*.php" -ls

# WP Rocket's config directory
ls -la wp-content/wp-rocket-config/

# PHP files in uploads: normally there should be none
find wp-content/uploads -name "*.php" -ls

# The file name pattern reported by Patchstack
find wp-content -name "wp-media-*.php" -ls

# Every PHP file changed since the day the attacks began
find . -name "*.php" -newermt "2026-11-25" -ls

How to read the output:

  • In wp-content itself, index.php is normal, and so are the drop-in files advanced-cache.php and object-cache.php if you use page or object caching. Anything else needs a look.
  • wp-rocket-config normally holds one configuration file per site domain. A file with another name, or one changed on a date when you did not save settings, is suspect.
  • The last command also lists files changed by ordinary updates. Compare the dates with updates you know about; WP Rocket's own files will show the date you updated the plugin.

Then verify WordPress core and the plugins from the official directory against their published checksums:

wp core verify-checksums
wp plugin verify-checksums --all

WP Rocket itself is skipped by the second command because it is not in the WordPress.org directory. These commands follow the WP-CLI documentation and were not run against an attacked site for this article.

Check the logs

The attack arrives as a POST request to admin-ajax.php. Web server access logs do not record the body of a POST, so the log cannot show which action was called, and ordinary visitors and other plugins use the same address. What the log can show is one address sending many such requests:

sudo grep "POST /wp-admin/admin-ajax.php" /var/log/nginx/access.log* | awk '{print $1}' | sort | uniq -c | sort -rn | head -20

Add zgrep for rotated .gz files. Patchstack's article lists the most active source addresses it saw; you can compare your top entries with that list. It also names what the attackers' servers looked like: bare IP addresses, nip.io host names and temporary trycloudflare.com tunnels. If you log outbound connections or DNS queries from the server, search them for those names. A request to one of them from your web server around the time of a suspicious POST is a strong sign.

If you find something

Treat the site as compromised. A person who ran PHP on the site could read wp-config.php, create an administrator and leave other files behind, so deleting the one file you found is not enough. In short:

  • keep a copy of the suspicious files and the logs before deleting anything;
  • list administrators with wp user list --role=administrator and remove any you do not know;
  • change the database password, the secret keys in wp-config.php, all administrator passwords, and any API keys stored in the site;
  • reinstall core and plugins from clean copies, or restore a backup from before 25 November and update at once.

The full procedure is in how to clean a hacked WordPress site. On a VPS with several sites under one user, check the other sites too.

One measure limits this kind of attack in general: do not let the web server run PHP from wp-content/uploads. Our WordPress security on nginx guide covers it. It would not have covered every location used here, so it is an extra layer, not a replacement for the update.

Sources: the CVE record and vulnerability database entry published by Patchstack, Patchstack's article of 27 November 2026, and WP Rocket's change log. Wordfence's advisory page could not be read by our tools and is not used here.

Share story:

Continue reading other guides on How VPS.