Trending

WP Rocket Vulnerability CVE-2026-125812: How to Check and Fix Your Site

• • 10 min read
WP Rocket Vulnerability CVE-2026-125812: How to Check and Fix Your Site

WP Rocket versions before 3.24.2 contain a critical flaw, CVE-2026-125812, that lets a stranger with no account on your site write a PHP file onto your server and run it. The fix takes about two minutes: update the plugin, or switch off two settings if you cannot update yet. This WP Rocket vulnerability guide covers who is exposed, the exact steps to fix it, how to tell whether your site was already hit, and what a real cleanup of an attacked online shop looked like.

What the WP Rocket vulnerability CVE-2026-125812 is

WP Rocket is a premium WordPress caching plugin. It ships a small script that runs in visitors’ browsers, measures each page, and reports the results to a public AJAX endpoint on your site. The Hacker News reports that the plugin does not check the URLs in those reports strictly enough, so an attacker can send a crafted report that makes the site download attacker-controlled content and save it as a PHP file.

The technical root cause, described by Ostorlab, is a path traversal. The cache and font code adds a URL path to a fixed folder without cleaning it, so “go up one folder” segments survive and the file lands outside the intended directory. The endpoint is admin-ajax.php with the action rocket_beacon, and it needs no login.

Patchstack rates the flaw 9.8 out of 10 (critical) and classifies it as unauthenticated remote code execution. Per Ostorlab, a successful attack can expose the database credentials in wp-config.php, create an administrator account, or alter plugin and theme files. A failed attempt can still overwrite writable files.

Are you affected? Versions and the two risky settings

Two conditions must both be true for a site to be exposed.

  • The plugin version is older than 3.24.2. The fix shipped on November 19, 2026. One summary of the vendor’s advisory narrows the vulnerable range to 3.15 through 3.24.1, but treat anything below 3.24.2 as affected.
  • At least one of two optimization features is switched on: LazyLoad for CSS background images, or Self-host Google Fonts. Both are off by default, but they are common on speed-tuned sites.

The font option goes by a few names. WP Rocket’s own documentation calls it Self-host Google Fonts, and some write-ups label it “Host Fonts Locally”. It is the same checkbox on the Media tab. The other option is documented as LazyLoad for CSS background images.

Ostorlab adds one more condition for code execution: the PHP process must be able to write to the target folder, and the web server must be willing to execute PHP from there. That detail matters later, in the hardening section.

Exploitation is not theoretical. The first recorded attempt was on November 25, 2026, and The Hacker News reports that tens of thousands of attempts were blocked in a single day on November 26. Ostorlab noted that the CVE was not yet in CISA’s Known Exploited Vulnerabilities list as of November 28, so do not wait for that list to act.

How to fix it: update first, or disable both settings

The steps below take under five minutes. Take a backup first, because any plugin update can interact with a theme or another plugin.

  1. In the WordPress dashboard, open Plugins and read the WP Rocket version. Anything below 3.24.2 is vulnerable.
  2. If your licence is active, click Update Now. Afterward, clear the WP Rocket cache. Version 3.24.3 followed on November 26 and keeps the fix, so either is fine.
  3. If you cannot update yet, open the WP Rocket settings, go to the Media tab, and untick both LazyLoad for CSS background images and Self-host Google Fonts. Save. According to Talk With Tech, this protection works even with an expired licence.
  4. Reload the site and click through a few pages. Without those two features, fonts load from Google again and background images load immediately, which is slower but safe.

Updating stops new attacks. It does not remove files an attacker already planted. If a vulnerable version ran with either setting on after November 25, continue to the next section.

How to check whether your site was already compromised

The public indicators published by Patchstack and repeated by The Hacker News are a good starting point, but real attackers rename things. Check for the known patterns and for anything that does not belong.

What to look for Where Why it matters
Unfamiliar PHP files, for example names starting with wp-media- wp-content, wp-content/uploads, wp-content/wp-rocket-config Published indicator of a planted backdoor
Any PHP file at all wp-content/uploads and wp-content/cache These folders should hold images and cache files, not scripts
Requests to rocket_beacon from visitors who never loaded the page they reported on Web server access logs The attack request pattern
Outbound connections from the server to unknown hosts Server or firewall logs The site fetching attacker content
Unknown administrators or scheduled tasks Users screen, cron list Persistence left behind after the first break-in

If anything turns up, treat the site as breached. Remove the files, change every password and key that was on the server (database, WordPress salts, hosting, FTP, API keys), and review who has administrator access. For notification duties after a breach, especially when customer data is involved, get professional advice for your country.

A real cleanup: how the attack looked on an online print shop

SmartUp World Web Solutions cleaned up one of these attacks on a Dutch online print shop that shared a managed server with two sister sites. The timeline is useful because it shows what the evidence looks like when you go looking for it.

  • November 26 to 30: attack attempts left crafted rows in the plugin’s own database table for font preloading, with font addresses pointing at hosts the attacker controlled. All three sites on the server were hit within days.
  • November 30: backdoor files appeared, disguised as the plugin’s own cache files with names starting “lz” or “wpr”. More backdoors showed up on a staging copy of the shop. The free tier of a malware scanner flagged files but did not clean them.
  • December 1 to 2: the files were removed and PHP execution was closed in the uploads and cache folders. The entry point was then found by reading web-server logs on the staging copy: two POST requests to the WordPress AJAX endpoint, then a fake font-CSS cache file full of “../../..” path tricks, then the attacker’s PHP file in the site root. A database search on the live shop confirmed the same crafted rows.

The order of that evidence is the practical lesson. Logs and database rows told the story directly, so nothing had to be guessed. Product and order data were checked afterward and were intact.

Why that site was still vulnerable: a pirated plugin

The fix had been public for a week by the time the attacks reached this shop. The reason it never arrived was that the plugin copy was not a genuine licensed one. It was a pirated, or “nulled”, build that answered licence checks with fake replies, so the dashboard never showed an update.

Security vendors say the same thing about nulled plugins in general. Sucuri lists hidden malware and backdoors and a lack of updates among the main risks. The saving on a licence fee disappears the first time a critical flaw like this one is fixed upstream and the cracked copy stays frozen.

A warning sign worth checking

If a premium plugin never shows an update, even while the vendor publishes releases, check the licence status inside the vendor’s own account area and compare the installed version with the vendor’s changelog. A plugin that always reports “up to date” is not proof of safety.

Lessons and hardening steps for any WordPress site

The same chain of events applies to many plugin flaws, not just this one. These steps limit the damage next time.

  1. Update security-relevant plugins quickly. A critical flaw with active attacks can be hit within a week of the fix release, as it was here.
  2. Use only genuine licensed or repository plugins. That includes caching plugins.
  3. Check every site on a shared server. Three sites on one server were hit within days. If one is attacked, assume the neighbors are targets too.
  4. Block PHP execution in uploads and cache folders. Ostorlab’s note that the server must be able to run PHP in the target folder is the reason this works as a safety net.
  5. Remember that .htaccess only works on Apache. On nginx the rule has to go into the server configuration, and the WordPress documentation covers both. On a managed host, ask support to confirm it is in place.
  6. Look for evidence, not guesses. Web-server logs and database tables identified the entry point in the case above.
  7. Plan the cleaning, not only the scanning. A free scanner may only detect. Cleaning and rotating passwords and keys are separate jobs.
  8. Keep a written log with an undo step for every change. It makes the cleanup safe to reverse.

For a wider checklist, see the guide to WordPress security hardening, the overview of WordPress security vulnerabilities, and the guide to website maintenance for small business.

Uncached and faster: what happened after removing the cache plugin

On the print shop, the decision was to remove the plugin and run without a page cache until a safe setup was chosen. The next fix was server-side. Tuning PHP’s OPcache cut the load time of an uncached page from about 1.13 seconds to about 0.74 seconds. OPcache stores compiled PHP code in memory, so the server does less work on every request even when pages are not cached.

That makes a useful decision rule. If a caching plugin has to be removed after an incident, fix the server layer first, then choose a replacement and review its settings before switching it on.

Frequently asked questions

Which WP Rocket versions are vulnerable to CVE-2026-125812?

Every version before 3.24.2 should be treated as vulnerable. Ostorlab lists 3.24.1 and earlier, and the fix was released on November 19, 2026. Version 3.24.3 followed on November 26 and keeps the fix.

Am I safe if I never turned on those two settings?

Exposure requires LazyLoad for CSS background images or Self-host Google Fonts to be enabled, and both are off by default. Updating is still the right move, because settings change and the fix removes the risk completely.

Does updating WP Rocket remove a backdoor?

No. Updating stops new attacks, but files an attacker already planted stay on the server. Search the folders listed above and review logs from November 25 onward.

Can I use WP Rocket safely with an expired licence?

You cannot update without an active licence, but you can still disable the two risky settings on the Media tab. That closes the exposure described in the sources until you renew.

How do I know if my WP Rocket copy is genuine?

Sign in to the vendor’s account area and confirm your licence and site activations there. A pirated build may show no updates at all, so compare the installed version against the vendor’s published release list.

Do .htaccess rules protect an nginx site?

No. Nginx ignores .htaccess files, so a rule that blocks PHP in the uploads folder has to be added to the server configuration. Ask your host if you cannot edit it.

The short version

Check the WP Rocket version today. If it is below 3.24.2, update or turn off both risky settings, then look for PHP files in the uploads, cache, and plugin config folders and for unknown administrators. If the plugin copy ever came from anywhere but the vendor, replace it with a licensed one, because that copy will not receive fixes. Then block PHP execution where it does not belong, so the next plugin flaw does less damage.

Al Mahbub Khan
Written by Al Mahbub Khan Full-Stack Developer & Adobe Certified Magento Developer

Leave a Reply