Cyber Security News

PoC released for W3 Total Cache Vulnerability that Exposes 1+ Million Websites to RCE Attacks

A proof-of-concept exploit has been publicly released for CVE-2025-9501, a critical, unauthenticated command-injection vulnerability affecting W3 Total Cache, one of WordPress’s most widely deployed caching plugins.

With over 1 million active installations, the vulnerability poses a significant risk to countless websites worldwide.

RCE Security discovers that the flaw exists in W3 Total Cache’s dynamic content parsing functionality, specifically in the _parse_dynamic_mfunc function within the PgCache_ContentGrabber class.

The vulnerable code uses PHP’s eval() function to execute code derived from cached page content, creating a direct code injection vector.

Page Cache is enabled in the plugin

Unauthenticated Command Injection Discovered

RCESecurity researchers analyzed WPScan’s initial advisory and developed a working exploit to validate the vulnerability’s severity.

The vulnerability requires specific conditions to be exploitable. Attackers must know the W3TC_DYNAMIC_SECURITY constant value defined in the site’s wp-config.php file.

Additionally, page caching must be enabled (core functionality but disabled by default), and website comments must be permitted for unauthenticated users.

If these conditions align, attackers can inject arbitrary PHP code through specially crafted HTML comments in cached pages, achieving complete remote code execution.

PropertyValue
CVE IDCVE-2025-9501
Vulnerability TypeUnauthenticated Command Injection / Remote Code Execution
Affected PluginW3 Total Cache
Affected VersionsVersions with vulnerable code in PgCache_ContentGrabber class
Attack VectorCached page content with malicious mfunc comments
ImpactRemote Code Execution, Complete Server Compromise
StatusExploit PoC Released

When the page cache processes a request, it invokes the vulnerable _parse_dynamic function, which searches cached content for specially formatted mfunc comment tags.

If an attacker knows the W3TC_DYNAMIC_SECURITY value, they can inject malicious PHP code within these tags. The code then executes directly on the server, granting attackers shell-level access.

A simple injection like <!– mfunc rcesec –>echo passthru($_GET[1337])<!– /mfunc rcesec –> enables command execution.

While technically straightforward to exploit once preconditions are met, the vulnerability’s real-world impact depends on WordPress administrator practices.

Sites using the W3TC_DYNAMIC_SECURITY feature with default values or weak secrets face heightened risk.

Comments are enabled for unauthenticated users

The combination of widespread plugin adoption and the ability to execute arbitrary code positions this as a critical threat.

RCESecurity recommends that Website administrators using W3 Total Cache immediately review their security configurations, turn off the feature if unused, or apply available patches.

The vulnerability underscores the importance of secure coding practices, particularly avoiding dynamic code evaluation functions like eval() in security-sensitive contexts.

Website owners should immediately review W3 Total Cache configurations, update to patched versions when available, and consider disabling dynamic content caching if it is not actively used.

Organizations running penetration tests should incorporate this vulnerability into their assessment protocols to identify exposed instances within their infrastructure.

Follow us on Google News, LinkedIn, and X for daily cybersecurity updates. Contact us to feature your stories.

Abinaya

Abi is a Security Editor and fellow reporter with Cyber Security News. She is covering various cyber security incidents happening in the Cyber Space.

Recent Posts

NSA, CISA and NIST Release New Security Guidelines to Detect and Shut Down Rogue AI Agents

NSA, CISA, and NIST have released joint security guidelines to help organizations detect, contain, and…

2 hours ago

Hackers Exploit SiteGuard WAF Vulnerability That Could Give Them Full Control of Servers

Hackers are exploiting a command injection flaw in SiteGuard Server Edition, a web application firewall…

2 hours ago

Hackers Registered New Teams-Based Domains and Used a Login Page to Steal Your Logins

A newly registered domain copies Microsoft Teams’ login page and interface, raising concerns about a…

2 hours ago

16-Year-Old Broadcom Wi-Fi Flaw Lets Attackers Hack Routers Without Knowing Passwords

A 16-year-old flaw in Broadcom’s Wi-Fi software can let attackers within wireless range take control…

2 hours ago

Google Unveils New Android AI Protections to Block Scam Calls, Phishing Links and OTP Theft

Google has announced a new set of Android security protections designed to stop mobile scams…

8 hours ago

Hackers Exploiting Plex Vulnerabilities in the Wild to Deploy Cryptominer Malware

Hackers are exploiting flaws in Plex Media Server to install cryptocurrency mining malware, with a…

10 hours ago