WP Rocket: critical WordPress plugin flaw exploited to plant PHP files without logging in

Top-Secured cyber watch: independent analysis based on the sources listed below. Top-Secured is not affiliated with the companies mentioned and will never ask you for your bank details or passwords.

Attackers are exploiting CVE-2026-125812, a flaw rated 9.8 in the WP Rocket caching plugin for WordPress, according to Patchstack. On sites where two optimisation features are enabled, an unauthenticated visitor can get the server to write a PHP file and run code. Version 3.24.2 fixes it, but does not remove files already dropped.

What happened

CVE-2026-125812 affects WP Rocket, a widely used commercial caching plugin for WordPress, in all versions before 3.24.2. The record, published on 25 November 2026 by Patchstack, rates it 9.8 under CVSS 3.1 and tags it as known to be exploited. In an advisory dated 27 November, Patchstack says it saw the first attack on 25 November at 15:27 UTC. Manual attempts quickly turned into automated campaigns run by several operators, with tens of thousands of attempts blocked on its customers’ sites on 26 November alone.

Who is affected and how attackers get in

Only sites with one of two options enabled are exposed: LazyLoad for CSS background images or Host Fonts Locally. Both are off by default but common on sites tuned for speed. According to Patchstack, a public AJAX endpoint (action=rocket_beacon on /wp-admin/admin-ajax.php) accepts URLs reported by the page measurement script without checking them. An attacker can make the site fetch content they control and save it as a PHP file, then execute it. No account is needed.

What to do now

  1. Check the installed version, for example with wp plugin get wp-rocket --field=version, and update to 3.24.2 or later.
  2. If you cannot update right away, turn off both options above until you can.
  3. Look for unexpected files named wp-media-*.php in wp-content/, wp-content/uploads/ and wp-content/wp-rocket-config/, for example with find wp-content -name 'wp-media-*.php'.
  4. Search your web server logs since 25 November for POST requests containing rocket_beacon, and for outbound connections to nip.io names or trycloudflare.com tunnels.
  5. If you find a dropped file, treat the site as compromised: isolate it, keep the logs, change database and admin passwords and restore from a clean backup.

Our take

Premium plugins do not always update themselves, and performance tweaks quietly widen the attack surface. Patching closes the door, but only a check of the file system tells you whether someone already walked through it.

Sources

How we choose, verify and write our analyses →

Is your own server exposed? Run a free check — public information only, no intrusion:

Check a server Check a website

Worried your servers are exposed? Our team audits, patches and monitors Linux and cloud infrastructure 24/7.

Talk to an expert Our managed server services →