A WP Rocket vulnerability tracked as CVE-2026-125812 lets anyone on the internet make a WordPress site write and run PHP code, with no login. It is rated CVSS 9.8, and attackers started using it on 25 November, six days after the fix came out. WP Rocket is a popular paid caching plugin, so many Indian business sites built by agencies run it. If yours does, update it today and then check for files left behind.
Updating closes the hole, but it does not remove files an attacker already planted. Do both steps below.
The short answer
- Affected: WP Rocket before 3.24.2. Reports list 3.15 to 3.24.1.
- Fixed: 3.24.2, released 19 November 2026.
- Exposed only if “LazyLoad for CSS background images” or “Host Fonts Locally” is switched on. Both are off by default but common on speed-tuned sites.
- Exploited since 25 November 2026, 15:27 UTC (Patchstack). Tens of thousands of blocked attempts on 26 November alone.
What the WP Rocket vulnerability does
Patchstack, which published the advisory, says attackers can make WP Rocket download content they control and save it as a PHP file that then runs on the server. Heise describes the root cause as a path traversal: a path name is not checked properly, so files land in folders they should not reach. Once a PHP file of the attacker’s choice runs, they control the site and can add admin users, redirect visitors or send spam from your server.
Step 1: check your WP Rocket version
In wp-admin, open Plugins and look at the version under WP Rocket. Or, on the server, read it from the plugin file:
grep -m1 "Version:" wp-content/plugins/wp-rocket/wp-rocket.phpOn our lab copy, set up to look like an unpatched site:
* Version: 3.24.1Anything below 3.24.2 has the WP Rocket vulnerability and needs the update. WP Rocket is a paid plugin, so updates come through your licence. If the licence has lapsed, the update may not show in wp-admin; download it from your WP Rocket account instead.
If you cannot update today, switch off both “LazyLoad for CSS background images” and “Host Fonts Locally” in the WP Rocket settings until you can.
Step 2: look for planted PHP files
Patchstack lists three places to look. Run these from the WordPress folder on your own server. We ran them in our lab on 3 December 2026 on a test folder where we planted two harmless PHP files ourselves, named wp-media-a1b2.php and cache-x.php.
PHP files in uploads. A normal uploads folder holds images and documents, not PHP:
find wp-content/uploads -type f -name "*.php"wp-content/uploads/2026/11/cache-x.phpPHP files sitting directly in wp-content. Patchstack mentions names like wp-media-*.php:
find wp-content -maxdepth 1 -type f -name "*.php"wp-content/wp-media-a1b2.phpA clean WordPress usually has only index.php here.
The WP Rocket config folder. It normally holds one PHP config file per domain, such as example.com.php. Anything else is suspect:
ls -la wp-content/wp-rocket-config/To list every PHP file outside the plugins folder changed since attacks began:
find wp-content -type f -name "*.php" -newermt "2026-11-25" -not -path "*/plugins/*"wp-content/wp-media-a1b2.php
wp-content/uploads/2026/11/cache-x.phpExpect some legitimate hits from theme or plugin updates. Open each file and compare it with a fresh copy before deleting anything.
Step 3: check the access log
The attacks are POST requests to /wp-admin/admin-ajax.php with action=rocket_beacon. Most access logs do not record the POST body, so you will not see the action name. What you can see is POSTs to that address from clients that never loaded a page. On our lab log, filtering out normal browsers left one script:
grep "POST /wp-admin/admin-ajax.php" access.log | grep -v "Mozilla"198.51.100.7 - - [26/Nov/2026:09:13:44 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 12 "-" "python-requests/2.32"Attackers can fake a browser user agent, so an empty result does not prove you are clean. Patchstack also suggests watching for outbound connections from the server to unknown addresses, nip.io names or trycloudflare.com tunnels.
If you find something
- Take a full backup of the site as it is, for evidence.
- Update WP Rocket to 3.24.2 or later.
- Remove the planted files and check for new admin users under Users.
- Change all admin passwords and the database password, and log everyone out.
- Scan with Wordfence or your host’s malware scanner, then run the checks again a day later.
If the site handles customer data and you confirm a compromise, the CERT-In six-hour reporting rule may apply. Our CERT-In guide explains what to report.
Free resource: our WordPress Security Checklist (2026) covers updates, admin accounts, backups and file permissions in one page.
Related guides
- HTTP Security Headers: Check Yours with curl and Fix Them
- How to Check If Your Linux Server Is Hacked: 10 Commands
- CERT-In 6-Hour Reporting Rule: What to Report and How
Sources
- Critical WP Rocket RCE (CVE-2026-125812) under active attack, Patchstack
- WP Rocket < 3.24.2 Remote Code Execution, Patchstack database
- Critical WP Rocket vulnerability exploited days after patching, SecurityWeek
- Attackers exploit critical code injection flaw in WP Rocket, heise
Not sure whether your site was hit? Our Emergency Exposure Check (₹2,999) checks up to five sites or hosts and gives a written verdict for each within 48 hours, with what to fix first and how to verify it. Full refund if we cannot check your setup.
