Skip to main content
Mallory
CriticalPublic exploit

Unauthenticated PHP Code Injection in W3 Total Cache

IdentifiersCVE-2025-9501CWE-94

CVE-2025-9501 is a vulnerability in the W3 Total Cache WordPress plugin affecting versions prior to 2.8.13. The flaw is in the plugin’s dynamic content parsing logic, specifically the _parse_dynamic_mfunc function in the PgCache_ContentGrabber class. According to the provided content, cached pages are processed by _parse_dynamic, which invokes _parse_dynamic_mfunc on specially crafted comments. The vulnerable code path uses eval() on attacker-controlled input, enabling PHP command/code injection. If an attacker can submit a malicious comment containing the required W3TC_DYNAMIC_SECURITY secret, arbitrary PHP code can be executed on the server. The issue has been described as an unauthenticated command injection / PHP injection vulnerability that can lead to remote code execution.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows arbitrary PHP code execution in the context of the WordPress application. This can result in full site compromise, including execution of attacker-supplied commands/code, theft of application data and credentials, modification of site content, deployment of webshells or malware, and potential pivoting to further compromise of the underlying host depending on server configuration and privileges.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by disabling the Page Cache feature, disabling unauthenticated comments, and preventing untrusted users from submitting comments to posts. Protect the W3TC_DYNAMIC_SECURITY secret from disclosure and review whether it is defined in wp-config.php, since the provided content indicates the vulnerable path is active only when that constant is present. Additional temporary measures include restricting public comment functionality, deploying WAF rules to detect/block malicious comment payloads targeting mfunc parsing, and monitoring for anomalous PHP execution or comment-based exploitation attempts.

Remediation

Patch, then assume compromise.

Upgrade W3 Total Cache to version 2.8.13 or later. Because the vulnerability affects versions before 2.8.13, updating the plugin is the primary remediation. Review WordPress and web server logs for suspicious comment submissions and signs of post-exploitation, especially if the plugin was exposed under the required conditions. If compromise is suspected, rotate WordPress, database, and any secrets stored on the host, including values in wp-config.php.
PUBLIC EXPLOITS

Exploits

1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.

VALID 1 / 1 TOTALView more in app
CVE-2025_9501-POCMaturityPoCVerified exploit

This repository is a small standalone Python proof-of-concept exploit for CVE-2025-9501, described in the code as a pre-authenticated remote code execution issue in the W3 Total Cache WordPress plugin. The repository contains only two files: a minimal README and the main exploit script, poc_cve_2025_9501.py. The Python script is the clear entry point and implements the full exploitation workflow. The exploit logic is structured around several stages. First, it verifies or assumes the target is a WordPress site using W3 Total Cache. It then discovers candidate posts that allow unauthenticated comments, primarily through the WordPress REST API endpoint /wp-json/wp/v2/posts and secondarily by scraping the homepage and individual article pages for post IDs and comment form markers. Once a suitable post is found, it submits a malicious comment to /wp-comments-post.php. The comment body contains a W3 Total Cache mfunc block wrapping PHP code, with the default payload echo passthru($_GET['cmd']);. This means arbitrary OS commands can be supplied later through the cmd query parameter. After comment injection, the script triggers execution by requesting the target post URL in the form /?p={post_id}&cmd={cmd}. If the vulnerable caching behavior processes the injected mfunc block, the supplied command executes on the server and its output is returned in the HTTP response. The script supports using a provided secret, attempting to brute-force common secrets, and optionally trying to extract the secret from wp-config.php exposure. Based on the visible code and CLI options, this is an actual exploit rather than a detector. It is operational but not heavily weaponized: it includes a working hardcoded PHP command-execution payload and some automation for discovery and secret handling, but it is still a simple standalone PoC rather than a framework-integrated exploit.

InnerFireZDisclosed Jan 14, 2026pythonmarkdownwebnetwork
What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware5

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity32

Community discussion across Reddit, Mastodon, and other social sources.