· JavaScript
WP Rocket plugin, CVE-2026-125812, allows arbitrary PHP code execution on WordPress sites
Active exploitation is underway targeting a critical vulnerability, CVE-2026-125812, within the WP Rocket caching plugin, which permits the execution of arbitrary PHP code on WordPress installations.
This paid plugin, designed to boost website performance through image lazy-loading, CSS optimization, and page caching, is utilized across more than 5.6 million sites by 394,000 customers, according to WP Media.
The issue stems from insufficient validation of data transmitted to a public endpoint, enabling unauthenticated attackers to inject and run PHP code sourced externally.
The flaw specifically impacts WP Rocket versions preceding 3.24.2 when the 'LazyLoad for CSS background images' or 'Host Fonts Locally' settings are active, though these are not enabled by default.
WP Media issued an advisory over the weekend, releasing fixes on November 19, urging all users to upgrade to version 3.24.2 or newer.
Patchstack noted the initial low-scale, manual exploitation attempts on November 25 at 15:27 UTC, with activity rapidly escalating to fully automated campaigns the subsequent day.
Researchers noted that the attacks leveraged both vulnerable features, sometimes within a single request, ensuring the exploit fires regardless of which option was active on the target site.
Patchstack stated, “Attackers use both feature paths, sometimes in one request, so that whichever feature a site has enabled, one of them fires,” adding that payloads are hosted on IP addresses, wildcard DNS names like nip.io, temporary trycloudflare.com tunnels, and other compromised WordPress sites.
For those unable to install the latest WP Rocket version, administrators should disable LazyLoad for CSS background images and Self-host Google Fonts via the WP Rocket > Page Optimization > Image & Media > Media tab.
Furthermore, Patchstack provided a helper plugin to assist those managing numerous websites in mitigating this risk and listed attacker IP addresses for immediate blocking.
Website administrators using the vulnerable version with an exploitable option must review their logs for suspicious outbound connections and requests, as updating does not erase previously implanted files.
Patchstack warned that large-scale, automated attacks are already occurring, evidenced by its security platform blocking over 25,000 malicious requests from various attackers.
Why it matters
Developers using WP Rocket must immediately upgrade to version 3.24.2 or later to mitigate this critical remote code execution risk. Since the vulnerability allows unauthenticated code execution, administrators should review logs for suspicious activity even after patching.





