Security

WP Rocket CVE-2026-125812: patch now, then hunt for planted PHP

Key takeaways

  • Update WP Rocket to 3.24.2 or later on every site, including staging copies and microsites
  • Patching does not delete PHP files an attacker already planted, so check wp-content/wp-rocket-config/ and the other listed directories
  • Any site that ran a vulnerable version with either optional feature on after 25 November should be treated as possibly compromised until checked

WP Rocket, a premium caching plugin for WordPress that speeds up sites by optimising pages, is under active attack through a critical flaw tracked as CVE-2026-125812. The bug carries a CVSS score of 9.8 and lets an unauthenticated attacker write and run PHP code on the server. It affects every version before 3.24.2, which WP Media released on 19 November 2026. Its developer says it runs on more than 5.5 million WordPress sites and has over 386,000 customers worldwide, so the audience for this warning is large: agencies, in-house web teams and anyone who bought a performance-tuning plugin and forgot about it.

This is not a conventional tool review, but the same questions apply to the plugin's risk profile, so the analysis below follows that shape.

What it does well

The plugin's appeal is the reason the flaw matters. WP Rocket handles page caching and a set of optimisations that performance-tuned sites tend to switch on. Two of those are central here: LazyLoad for CSS background images, which defers loading of images referenced in stylesheets, and Host Fonts Locally, which serves Google Fonts from the site's own server rather than a third party. Both are popular with teams chasing page-speed scores.

Some optimisations rely on a small script that runs in each visitor's browser, measures the page and reports the results to a public AJAX endpoint (the rocket_beacon action on /wp-admin/admin-ajax.php). WP Rocket then uses those reported URLs when it builds optimised assets. That design gives it real-world measurements without manual configuration. It is also where the trouble starts.

Where it falls short

The plugin did not validate the reported URLs strictly enough. According to Patchstack researcher Dave Jong, an attacker can send a crafted report that makes the site download content from an attacker-controlled server and save it as a PHP file. The attacker then requests that file and the server executes it. No login, user interaction or special network position is needed. The CVE record classifies the weakness as path traversal (CWE-22) and scores it 9.8 under CVSS 3.1.

Disclosure was thin. WP Media has not published a separate security advisory, and the 3.24.2 changelog describes the fix only as improved validation of cached CSS, font and preconnect files. A site owner reading release notes would not learn that the update closes a remote code execution hole.

Both vulnerable features are off by default, but a site with both disabled still runs the vulnerable code. Turning either on later reopens the exposure on an unpatched install.

Timing made it worse. The first exploitation attempt was recorded on 25 November 2026 at 3:27 p.m. UTC, six days after the patch. Activity then escalated to automated campaigns, with tens of thousands of attempts blocked on 26 November alone. Wordfence reported blocking 135 attacks over the past 24 hours in its advisory, while SOCRadar cites nearly 400 in the last 24-hour period. A proof-of-concept exploit is publicly available on GitHub. The CISA ADP assessment of "Exploitation: none" dates from publication, roughly three hours before the first attempt, and is now out of date.

How it compares

WP Rocket is a premium product, and the source gives no pricing or feature data for alternatives, so a vendor-by-vendor comparison would be guesswork. What the source does support is a comparison of how the exposure differs by configuration:

ConfigurationExploitable via this pathAction
Before 3.24.2, either feature onYesUpdate, then hunt for planted files
Before 3.24.2, both features offNo, but vulnerable code presentUpdate; enabling a feature later reopens the hole
3.24.2 or laterNo new attacksCheck for files planted before patching

For teams weighing a switch to another caching plugin, the lesson is to ask how it validates data that arrives from visitors' browsers. Any feature that accepts client-side measurements on a public endpoint needs the same scrutiny.

Pricing and value

The source gives no licence prices for WP Rocket. What it does show is the hidden cost: a premium subscription does not cover the staff time to find every install, including staging copies and microsites that are easy to forget, and then audit them. Sites that ran a vulnerable version with either feature enabled after 25 November should be treated as possibly compromised until checked.

UK organisations with WordPress estates are in the same position as US ones; the plugin is sold worldwide and the attacks are automated.

Who should use it

Anyone running WP Rocket should update, whatever their settings. The practical sequence from the research:

  1. Update to 3.24.2 or later on every site.
  2. If an immediate update is not possible, disable both LazyLoad for CSS background images and Host Fonts Locally until it is.
  3. Search wp-content/wp-rocket-config/, wp-content/uploads/ and wp-content directly for unexpected wp-media-*.php files and compare them against a known-good backup.
  4. Review web server and WAF logs from 25 November for rocket_beacon requests from clients that never loaded the page they report on.
  5. Look for outbound requests from the web server to bare IP addresses, nip.io domains, temporary trycloudflare.com tunnels or unrelated WordPress sites that may themselves be compromised.

Patchstack published ten active source IP addresses, among them 103.235.74.71 and 201.79.120.217, but warns that mass-exploitation infrastructure rotates quickly. They are best used for searching historical logs, not as a blocklist. Teams already working through other actively exploited 9.8 bugs, such as N-able N-Central CVE-2026-86218, will recognise the pattern: patch, then assume compromise until proven otherwise.

No one has published a count of sites actually compromised, and attack volume alone does not show how many attempts succeeded on unprotected installs. The risk falls on sites that delay plugin updates. The flaw is not a zero-day, since the fix was available six days before the first observed attempt.

Verdict

Update everything now, then spend the time on the second job that matters more: checking for files an attacker may already have left behind. For wider server-side clean-up habits, the checklist approach in the Nginx2Root patching guide is a useful model.

Frequently asked questions

Which WP Rocket sites are exposed to CVE-2026-125812?

Versions before 3.24.2 with either LazyLoad for CSS background images or Host Fonts Locally switched on. Both are off by default, but a site with both off still runs the vulnerable code.

Does updating to 3.24.2 clean up a hacked site?

No. The update stops new attacks but does not remove files an attacker already planted. Check the listed directories for unexpected wp-media-*.php files and review logs from 25 November.

More from Future Technology HQ