Attackers are exploiting a critical WP Rocket vulnerability to run arbitrary PHP code on WordPress sites. WordPress security firm Patchstack says it has blocked more than 25,000 malicious requests from multiple attackers.
The flaw, CVE-2026-125812, affects versions before 3.24.2, but only when either of two optional features is enabled. Those features are ‘LazyLoad for CSS background images’ and ‘Host Fonts Locally’. Both are disabled by default.
Site owners should install WP Rocket 3.24.2 or later. Updating does not remove files attackers may already have planted.
WP Rocket is a paid plugin for speeding up WordPress sites through page caching, CSS optimization and lazy-loading images. Developer WP Media says 394,000 customers use it on more than 5.6 million sites. That total does not represent the number of vulnerable sites.
The vulnerability stems from inadequate checks on data submitted to a public endpoint. Attackers do not need to log in to exploit it. They can make a vulnerable site write and execute PHP code fetched from an external location.
According to Patchstack, some attack requests target both affected features at once. This lets an attempt succeed when either feature is enabled.
The attackers distribute their code through bare IP addresses, wildcard DNS names such as nip.io, and temporary trycloudflare.com tunnels. They also use other WordPress sites that Patchstack believes are likely compromised.
Patchstack first detected limited, manual exploitation attempts on November 25 at 15:27 UTC. Fully automated campaigns followed on November 26.
WP Media had released the fix on November 19. It published a security advisory over the weekend, urging customers to update.
For administrators unable to update immediately, the vendor provided a workaround. They should disable ‘LazyLoad for CSS background images’ and ‘Self-host Google Fonts’. These controls are under WP Rocket > Page Optimization > Image & Media > Media tab.
WP Media also supplied a helper plugin for administrators who need to mitigate the risk across multiple websites. Patchstack published attacker IP addresses and urged website owners to block them.
Administrators who used an affected version with either vulnerable feature enabled should also examine their logs. They should look for suspicious requests and outbound connections, since installing the fix alone does not clean up an earlier compromise.
Source: bleepingcomputer.com

