Hackers Exploit Critical WP Rocket Flaw to Run Code on WordPress Sites

Attackers are exploiting CVE-2026-125812, a critical unauthenticated flaw in the WP Rocket caching plugin, to plant and run PHP code on WordPress sites that have not updated.
Official WP Rocket logo centered on a dark navy background with faint warning triangle, padlock shield and code bracket outlines

Attackers are actively exploiting a critical flaw in WP Rocket, a popular paid caching plugin for WordPress, to write and run their own PHP code on vulnerable websites. The bug, tracked as CVE-2026-125812, needs no login and carries a CVSS score of 9.8.

WP Rocket’s developer, WP Media, fixed the flaw in version 3.24.2 on November 19, 2026. Exploitation began within hours of the vulnerability being made public on November 25, and it quickly grew into automated attacks against sites that had not yet updated.

Which WP Rocket sites are at risk

According to the WP Rocket security advisory, the flaw affects versions 3.15 through 3.24.1 when at least 1 of 2 optional features is turned on:

  • LazyLoad for CSS background images
  • Self-host Google Fonts (also called Host Fonts Locally)

Both features are off by default, but they are common on sites tuned for speed. WP Rocket runs on more than 5.5 million sites, according to WordPress security firm Patchstack, which assigned the CVE.

How the flaw works

WP Rocket uses a small script in visitors’ browsers to measure each page and send the results to a public WordPress endpoint. The plugin then uses the reported stylesheet and font addresses to optimize the page. Patchstack says the plugin does not check those addresses strictly enough.

An attacker can send a fake report that points to a file on a server they control, with a path that escapes WP Rocket’s cache folder and ends in “.php”. WP Rocket downloads the file and saves it inside the website. The attacker then opens that file in a browser, and the server runs the code. That gives the attacker the same control over the site as the web server itself.

Attacks began hours after disclosure

The CVE record was published at 12:09 UTC on November 25. In its exploitation report, Patchstack said it saw the first attack attempt at 15:27 UTC the same day, a little over 3 hours later.

The first attacker worked by hand, testing a payload against a few sites and retrying with encoded versions when it was blocked. Within a day, the activity had turned into automated campaigns, with tens of thousands of blocked attempts on November 26 alone. Patchstack says several separate operators are now involved.

Every attempt targets the same request: a POST to /wp-admin/admin-ajax.php with action=rocket_beacon. Attackers often try both vulnerable features in a single request, so whichever one a site has enabled will fire. They host their payloads on bare IP addresses, wildcard DNS names such as nip.io, temporary trycloudflare.com tunnels and other WordPress sites that are likely already compromised. One cluster sent identical requests from 4 home internet addresses, a sign of a rotating proxy network.

The 10 most active addresses accounted for about half of all blocked attempts, Patchstack said. They traced back to hosting providers and internet carriers in Indonesia, Italy, the Philippines and Singapore, as well as DigitalOcean.

The flaw was not in the US Cybersecurity and Infrastructure Security Agency’s Known Exploited Vulnerabilities catalog when BreachNews checked on November 30.

How to fix and check your site

WP Media’s main advice is to update WP Rocket to version 3.24.2 or later. Updates require an active license. Site owners whose license has expired, or who cannot update right away, should open WP Rocket > Page Optimization > Image & Media and turn off both LazyLoad for CSS background images and Self-host Google Fonts. On versions before 3.24, those settings are under the Media tab.

For agencies and hosts managing many sites, WP Media has released a small helper plugin that switches off both features. It can be deployed with WP-CLI:

wp plugin install ./wp-rocket-mitigate-cve-2026-125812.zip --activate

Updating stops new attacks, but it does not remove anything an attacker already planted. If either feature was enabled while a site ran a vulnerable version, Patchstack recommends checking for:

  • Unexpected PHP files in wp-content/wp-rocket-config/, wp-content/uploads/ or directly in wp-content/, such as files named wp-media-*.php
  • Suspicious beacon requests to rocket_beacon from clients that never loaded the page they report on, or that report full URLs where WP Rocket expects bare domains
  • Outbound connections from the web server to unfamiliar hosts, nip.io names or trycloudflare.com tunnels

Any site that shows these signs should be treated as compromised. Our guide on how to check if your WordPress site was hacked walks through the next steps, including resetting admin passwords, reviewing user accounts and restoring from a clean backup.

The attacks follow a busy few weeks for content management system flaws. Attackers recently exploited a Drupal installer flaw to take over sites, and BreachNews also covered the Click2Shell WordPress flaw that enabled remote PHP code execution.

Picture of m00s3c

m00s3c

Moose (@m00s3c) is the author of BreachNews, focusing on data breach intelligence, dark web monitoring, and threat analysis. His work involves analyzing breach claims, reviewing leaked datasets, and tracking threat actor activity to provide clear, factual reporting.

Latest News

Support independent news.

Every donation goes straight toward keeping this site fast, ad-free, and on top of the breaches that matter.

Thanks for reading.

Support the site