WP Rocket flaw CVE-2026-125812 exploited to run PHP code on WordPress sites
A critical flaw in the WP Rocket plugin, CVE-2026-125812, is being exploited in automated attacks. Sites should move to version 3.24.2 or later and check for files planted before patching.

Key points
- CVE-2026-125812 lets unauthenticated attackers write and run PHP code on WordPress sites through a public endpoint.
- Versions before 3.24.2 are affected when 'LazyLoad for CSS background images' or 'Host Fonts Locally' is enabled; both are off by default.
- WP Media released the fix on November 19; Patchstack saw first manual attempts on November 25 and automated campaigns the next day.
- Patchstack reports its platform blocked more than 25,000 malicious requests from multiple attackers.
- Updating does not remove files already planted, so logs need review.
What happened
A critical vulnerability, tracked as CVE-2026-125812, is being actively exploited in WP Rocket, a paid WordPress caching and performance plugin. According to its developer, WP Media, the plugin is used on more than 5.6 million sites. The flaw stems from insufficient validation of data sent to a public endpoint, which lets unauthenticated attackers write and run PHP code fetched from an external source.
Who is exposed
Versions before 3.24.2 are affected, but only when 'LazyLoad for CSS background images' or 'Host Fonts Locally' is enabled. Both options are off by default. WP Media released fixes on November 19 and later published an advisory urging upgrades.
Patchstack observed the first low-scale manual attempts on November 25 and fully automated campaigns the following day. Attackers targeted both features, sometimes in one request, so the exploit works whichever option is active. Payloads were hosted on bare IP addresses, wildcard DNS names, temporary tunnels and other WordPress sites that are likely compromised.
What to do next
Upgrade to 3.24.2 or later. Where that is not possible, turn off the two options in the plugin's Media settings. WP Media has also shared a helper plugin for administrators managing many sites. Patching does not remove files an attacker has already planted, so sites that ran a vulnerable version with either option enabled should have their logs reviewed for suspicious requests and outbound connections.
What to do now
- Inventory all WordPress sites, including those run by agencies, and identify which use WP Rocket and at what version.
- Upgrade WP Rocket to 3.24.2 or later; where delayed, disable LazyLoad for CSS background images and Self-host Google Fonts.
- Review web server and outbound traffic logs since November 19 for suspicious requests, unexpected PHP files and unfamiliar external connections.
- Add the attacker IP addresses published by Patchstack to the WAF or firewall blocklist.
- If signs of compromise appear, start incident response, and report per NCA and sector-regulator requirements.
How useful was this story?
0.0 out of 5 · 0 ratings
Related frameworks
Our consultants can assess your exposure and map the change to your controls and evidence.
