CVE Professor
/
All CVEs
CVE-2026-125812

CVE-2026-125812 — WP Media WP Rocket (3.24.2) — CWE-22

CRITICAL CVSS 9.8 CVE.org

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in WP Media WP Rocket wp-rocket allows Path Traversal.This issue affects WP Rocket: from n/a before 3.24.2.

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in WP Media WP Rocket wp-rocket allows Path Traversal.This issue affects WP Rocket: from n/a before 3.24.2.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a classic Path Traversal (CWE-22) flaw within the WP Rocket WordPress plugin, specifically affecting versions prior to 3.24.2.

Technical Flaw Analysis:
The core issue lies in the improper sanitization and validation of file path inputs. WP Rocket, a caching and optimization plugin, likely processes file paths for cache clearing, asset minification, or log management. The vulnerability indicates that an input parameter (likely a filename or directory path) is concatenated into a system file operation (such as file_get_contents, fopen, unlink, or readfile) without adequately restricting the path to a specific, safe directory (e.g., wp-content/cache/).

Missing Controls:
1. Canonicalization: The application fails to resolve relative path components (../) before checking if the path is within the allowed directory.
2. Base Directory Enforcement: There is no strict enforcement that the final resolved path must start with the intended base directory (e.g., ABSPATH . 'wp-content/cache/').
3. Input Validation: The input is not validated against a whitelist of allowed characters or patterns, allowing null bytes (if PHP version permits) or directory traversal sequences to pass through.

CVSS Vector Interpretation (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H):

  • AV:N (Network): Exploitable remotely over the network.

  • AC:L (Low Complexity): No special conditions required; the payload is straightforward.

  • PR:N (No Privileges): Unauthenticated access is sufficient. This is critical, meaning any visitor can trigger the vulnerability.

  • UI:N (No User Interaction): No user action (like clicking a link) is needed.

  • S:U (Unchanged Scope): The vulnerable component and the impacted component are the same (the web server/PHP process).

  • C:H/I:H/A:H (High Impact): The vulnerability allows for full compromise of Confidentiality, Integrity, and Availability. This suggests the path traversal can be leveraged to read sensitive files (like wp-config.php for database credentials) and potentially write to arbitrary locations if the underlying function supports writing (e.g., via a cache file creation mechanism), leading to Remote Code Execution (RCE).
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: The attacker identifies that the target is running WordPress and has the WP Rocket plugin installed.
  • * Check for wp-content/plugins/wp-rocket/ in the source code or via directory listing. * Look for specific headers or cookies set by WP Rocket (e.g., wpr- prefixed cookies). * Check the plugin version via the readme.txt file if accessible: /wp-content/plugins/wp-rocket/readme.txt.
  • Version Verification: Confirm the version is < 3.24.2.
  • 2. Exploitation

    Note: The exact endpoint and parameter name are not explicitly stated in the CVE description. The following is an illustrative example of how such a vulnerability is typically exploited in WordPress plugins. In practice, the attacker would need to identify the specific AJAX action or REST API endpoint that handles file operations.

    Hypothesized Vulnerable Endpoint:
    Many WordPress plugins use admin-ajax.php for background tasks. A common pattern for cache clearing or file manipulation is an action like wp_rocket_clear_cache or wp_rocket_process_file.

    Illustrative PoC (curl):
    Assume the vulnerable parameter is file_path in an unauthenticated AJAX call (or a public REST endpoint if exposed).

    # Illustrative Example: Attempting to read wp-config.php
    # The payload uses ../ to traverse up from the expected cache directory to the WordPress root.
    # The exact path depends on the base directory used in the vulnerable code.
    
    curl -X POST "https://target.com/wp-admin/admin-ajax.php" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "action=wp_rocket_vulnerable_action&file_path=../../../../wp-config.php"

    Alternative: Direct File Inclusion via Cache Busting
    If the plugin exposes a direct file handler for cache files:

    # Illustrative Example: Reading a file via a direct request
    # Assuming the plugin has a route like /wp-content/plugins/wp-rocket/assets/cache.php?file=...
    curl "https://target.com/wp-content/plugins/wp-rocket/assets/cache.php?file=../../../../wp-config.php"

    Key Exploitation Mechanics:
    1. Path Traversal: The ../../../../ sequence moves the file pointer up the directory tree.
    2. Target File: wp-config.php contains database credentials (DB_USER, DB_PASSWORD, DB_NAME).
    3. Potential RCE: If the vulnerable function writes to the file (e.g., saving a cache file), the attacker can upload a PHP webshell:

    # Illustrative Example: Writing a webshell
        curl -X POST "https://target.com/wp-admin/admin-ajax.php" \
          -d "action=wp_rocket_vulnerable_action&file_path=../../../../shell.php&content=<?php system($_GET['cmd']);?>"

    3. Post-Exploitation

    1. Credential Theft: Extract DB_USER and DB_PASSWORD from wp-config.php. 2. Database Access: Use the credentials to connect to the MySQL/MariaDB database. 3. Privilege Escalation: * Modify the wp_users table to change the user_pass hash of the admin account to a known hash. * Or, insert a new user with the administrator role in wp_usermeta. 4. RCE (if write access is available): * Upload a PHP webshell to a writable directory (e.g., wp-content/uploads/). * Execute system commands via the webshell to install persistence mechanisms, mine cryptocurrency, or pivot to other internal systems. 5. Data Exfiltration: Dump the entire database, including user emails, passwords (hashed), and private content.

    🌍 Real World Impact

  • Confidentiality (High):
  • * Exposure of database credentials, API keys, and sensitive configuration data. * Theft of user data (emails, hashed passwords, personal information). * Exposure of private WordPress content.
  • Integrity (High):
  • * Unauthorized modification of database records (e.g., changing admin passwords, altering content). * Injection of malicious code into the website (webshells, backdoors). * Defacement of the website.
  • Availability (High):
  • * Deletion of critical files (e.g., wp-config.php, theme files) leading to site downtime. * Resource exhaustion via malicious cache operations. * Database corruption or locking.

    Practical Consequences:

  • Complete Site Compromise: The attacker gains full control over the WordPress site.

  • Lateral Movement: If the web server has access to other internal services, the attacker can pivot.

  • Reputational Damage: Data breaches and defacement harm the organization's reputation.

  • Financial Loss: Costs associated with incident response, legal liabilities, and potential fines (GDPR, CCPA).
  • 🛡️ Remediation & Mitigation

    1. Immediate Patching

  • Upgrade WP Rocket: Update the plugin to version 3.24.2 or later immediately.
  • * Go to Plugins > Installed Plugins in the WordPress admin. * Click "Update Now" for WP Rocket. * Alternatively, download the latest version from the WP Rocket website and upload it via FTP.

    2. Workarounds (If Immediate Update is Not Possible)

  • Disable the Plugin: Deactivate WP Rocket if caching is not critical.
  • * Plugins > Installed Plugins > WP Rocket > Deactivate
  • WAF Rules: Implement a Web Application Firewall rule to block path traversal attempts.
  • * ModSecurity Rule Example:
    SecRule REQUEST_URI|ARGS "@rx \.\./" \
                "id:100001,phase:1,deny,status:403,msg:'Path Traversal Attempt Detected',log"

    * Cloudflare: Enable "Block Common Exploits" and "Path Traversal" rules.

  • File System Permissions:

  • * Ensure the web server user (e.g., www-data) does not have write permissions to sensitive directories like wp-content/plugins/ or wp-includes/.
    * Make wp-config.php read-only for the web server user if possible (though this may break some functionality).

    3. Detection & IoCs

  • Web Server Logs:
  • * Look for requests containing ../ or ..%2f in the query string or POST body. * Example log pattern:
    GET /wp-admin/admin-ajax.php?action=wp_rocket_vulnerable_action&file_path=../../../../wp-config.php HTTP/1.1

    * Monitor for unusual file access patterns in the web server's access logs.

  • File System Monitoring:

  • * Use tools like auditd (Linux) or Sysmon (Windows) to monitor for unexpected file reads/writes by the web server process.
    * Look for new PHP files in writable directories (e.g., wp-content/uploads/, wp-content/cache/).
  • Database Monitoring:

  • * Monitor for unexpected changes to the wp_users and wp_usermeta tables.
    * Look for new users with the administrator role.

    ⚠️ Urgency

  • CVSS Score: 9.8 (Critical)
  • CISA KEV: No (as of the provided data)
  • Exploit Complexity: Low
  • Authentication Required: None
  • Patching Priority: CRITICAL / IMMEDIATE

  • Reasoning: This is an unauthenticated, network-exploitable vulnerability with high impact on all three CIA triad components. The low complexity and lack of authentication requirements make it highly likely to be exploited in the wild, especially by automated scanners and botnets.
  • Action: Patch immediately. Do not wait for the next scheduled maintenance window. If patching is not possible within hours, disable the WP Rocket plugin or implement strict WAF rules to block path traversal attempts.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="WP Media WP Rocket"
CVSS Score
9.8 / 10 · CVSS CRITICAL
Weakness Types (CWE)
Affected Products (1)
WP Media:WP Rocket (3.24.2)
References & Advisories (1)
Related CVEs
9.3
CVE-2026-136358
Joomla Extension - joomboost.com - Unauthenticated SQL injection in JoomMedia extension 1.0.0-6.1.5 - The list
9.2
CVE-2026-144598
Homebox 0.22.0-rc.2 through 0.27.1 contains an authentication bypass vulnerability in UserService.LoginOIDC th
9.0
CVE-2026-136364
Joomla Extension - joomboost.com - Unrestricted file upload in JoomMedia extension 1.0.0-6.1.5 - The upload fu
8.8
CVE-2026-144410
Emby Server is a personal media server. Prior to 4.10.2.0 and beta 4.11.0.9, an authenticated user can supply
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
9.8
CVE-2026-145055
PraisonAI pip praisonai before 4.8.0, praisonaiagents and npm praisonai before 1.8.0, and praisonai-bot, prais
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L