Threat intel4 min read
WP Rocket flaw CVE-2026-125812 exploited to plant PHP files
Attackers are using a critical WP Rocket bug (CVSS 9.8) to write and run PHP on WordPress sites without logging in. Update to 3.24.2 and check for planted files.
4Tify Team

Attackers are exploiting CVE-2026-125812, a critical flaw in the WP Rocket caching plugin for WordPress that lets anyone with network access write a PHP file to the server and run it. No login is needed. The fix shipped in WP Rocket 3.24.2 on November 19, 2026, and the first attack attempts followed six days later.
What happened
The CVE record, published on November 25, rates the bug 9.8 on CVSS 3.1 and classifies it as a path traversal weakness (CWE-22) that leads to remote code execution. It affects every WP Rocket release before 3.24.2. WP Rocket's changelog lists the 3.24.2 fix as improved validation of cached CSS, font and preconnect files.
The first exploitation attempt was recorded on November 25, 2026, at 15:27 UTC. By the next day the traffic had turned into automated scanning, with tens of thousands of malicious requests blocked on November 26 alone. How many sites were actually compromised has not been reported.
The flaw is not in CISA's Known Exploited Vulnerabilities catalog as of December 2.
Who is affected
WP Rocket is a paid plugin that its developer, WP Media, says runs on more than five million WordPress sites. A site is exposed when both of these are true:
- it runs a WP Rocket version older than 3.24.2;
- it has at least one of two optimization settings switched on: "LazyLoad for CSS background images" or "Host Fonts Locally".
Both settings are off by default. If you are not sure whether someone turned them on, open the WP Rocket settings and look rather than relying on memory.
How the attack works
To decide what to optimize, WP Rocket runs a small script in each visitor's browser. The script measures the page and sends a report to a public WordPress AJAX endpoint (admin-ajax.php, action rocket_beacon). Anyone can send that report, not only real browsers.
The report includes URLs for background images and font stylesheets. Before 3.24.2, the plugin did not check those URLs strictly enough. An attacker sends a forged report pointing to a server they control, WP Rocket downloads the file, and because the cache path is built without stripping .. sequences, the file can be written outside the cache folder with a .php extension. Once it sits in a web-reachable folder, the attacker calls it and their code runs with the permissions of the web server.
What to do now
- Update WP Rocket to 3.24.2 or later. Version 3.24.3 came out on November 26. Check the version under Plugins in the WordPress dashboard.
- If you can't update today, turn off both "LazyLoad for CSS background images" and "Host Fonts Locally" until you can.
- Check for files already planted. The update blocks new attacks but does not delete anything an attacker already wrote. If the site ran an older version with either setting on, look for unexpected PHP files, especially ones named like
wp-media-*.php, inwp-content/wp-rocket-config/,wp-content/uploads/andwp-content/. - Review the logs back to November 25. Look for POST requests to
admin-ajax.phpwithaction=rocket_beaconfrom clients that never loaded the page they report on, and for outbound connections from the web server to unfamiliar hosts,nip.ionames ortrycloudflare.comtunnels. - If you find a planted file, treat the site as compromised: restore from a clean backup, change the database password, the WordPress salts and every admin password, and check for new admin users.
The technical details and affected versions are in the NVD entry for CVE-2026-125812.
If you look after several WordPress sites, the hard part is knowing which of them still run an old plugin. Our vulnerability scanning checks your public sites for plugins with known CVEs, paid ones included, and tells you which site still runs a version older than the fix.
