WP Rocket CVE-2026-125812: attackers plant PHP on WordPress sites without logging in


Attackers are exploiting a critical flaw in WP Rocket, one of the most widely used caching plugins for WordPress. It lets anyone, without logging in, write a PHP file to a site and run it. WordPress security company Patchstack, which says WP Rocket runs on more than 5.5 million sites, saw the first attack on 25 November at 15:27 UTC.
That was about three hours after the CVE record went public, and six days after WP Rocket shipped the fix.
Who is exposed
Every WP Rocket version before 3.24.2 has the bug. A site is only open to attack if it has at least one of two optimisation features turned on:
- LazyLoad for CSS background images
- Host Fonts Locally, which saves Google Fonts on your own server
Both are off by default, but Patchstack says both are common on sites tuned for speed. WP Media, the company behind WP Rocket, released 3.24.2 on 19 November. Its changelog describes the fix in one line: “Improve validation of cached CSS, font and preconnect files”.
A researcher using the name Vorelito reported the flaw through Patchstack’s bug bounty programme.
How the attack works
WP Rocket runs a small script in each visitor’s browser that measures the page and reports back to a public endpoint. WP Rocket then uses the URLs in that report to build optimised CSS and font files. Patchstack says it doesn’t check those URLs strictly enough.
An attacker sends a fake report pointing at their own server. WP Rocket
downloads the attacker’s content and saves it as a PHP file, and the
attacker then runs it. Every attack goes to the same place:
POST /wp-admin/admin-ajax.php with action=rocket_beacon.
Automated within a day
Patchstack says the first attacker worked by hand. They tried a payload on a few sites, then sent encoded versions when the first was blocked. By 26 November, automated campaigns had taken over, and Patchstack blocked tens of thousands of attempts that day.
Several separate operators are involved. Some send one request that
targets both features at once, so whichever one a site uses gets hit. They
host payloads on bare IP addresses, on nip.io names and temporary
trycloudflare.com tunnels, and on other WordPress sites that Patchstack
thinks are already compromised.
The ten busiest addresses made about half of the blocked attempts. They sit in Indonesia, Italy, the Philippines, Singapore and at DigitalOcean. These counts cover blocked requests on sites Patchstack protects, not confirmed break-ins. Nobody has said who is behind the attacks.
This is the second content management system flaw we’ve covered in a week where attackers went straight for unpatched sites, after the Drupal installer bug.
What to do
- Update WP Rocket to 3.24.2 or later.
- If you can’t update yet, turn off LazyLoad for CSS background images and Host Fonts Locally.
- Updating doesn’t remove files an attacker already planted. Look for PHP
files that shouldn’t be there in
wp-content/wp-rocket-config/,wp-content/uploads/and directly inwp-content/. Patchstack giveswp-media-*.phpas an example name. - Search your web logs back to 25 November for
rocket_beaconrequests from clients that never loaded the page they report on, or that send full URLs where WP Rocket expects bare domain names. - Check for outbound requests from your web server to unfamiliar hosts,
nip.ionames ortrycloudflare.comtunnels. - Block the addresses above if they’re hitting you, but expect the attackers to move.