CLP Varnish Cache <= 1.0.2 - Missing Authorization
Description
The CLP Varnish Cache plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 1.0.2. This makes it possible for unauthenticated attackers to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=1.0.2Source Code
WordPress.org SVNThis research plan focuses on identifying and exploiting a missing authorization vulnerability in the **CLP Varnish Cache** plugin (<= 1.0.2). The vulnerability allows unauthenticated attackers to trigger cache purging, which is an administrative action. --- ### 1. Vulnerability Summary * **ID:*…
Show full research plan
This research plan focuses on identifying and exploiting a missing authorization vulnerability in the CLP Varnish Cache plugin (<= 1.0.2). The vulnerability allows unauthenticated attackers to trigger cache purging, which is an administrative action.
1. Vulnerability Summary
- ID: CVE-2026-24525
- Plugin: CLP Varnish Cache (slug:
clp-varnish-cache) - Vulnerable Version: <= 1.0.2
- Vulnerability Type: Missing Authorization
- Description: The plugin registers a function responsible for purging the Varnish cache via WordPress hooks (likely AJAX or
admin_init). This function fails to implementcurrent_user_can()checks, and either intentionally or accidentally permits unauthenticated access (viawp_ajax_nopriv_or by using a hook that fires for all users).
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php(most likely) or/wp-admin/admin-post.php. - Action Name: Likely
clp_varnish_purge_allorclp_purge_cache(inferred from plugin name). - Parameters:
action=clp_varnish_purge_all(POST/GET). - Authentication: None (Unauthenticated).
- Preconditions: The plugin must be active and configured with a Varnish server (though the purge command will likely be attempted regardless of successful connection).
3. Code Flow (Inferred)
- Entry Point: The plugin registers an AJAX action in the main plugin file or an includes file:
add_action( 'wp_ajax_nopriv_clp_varnish_purge_all', 'clp_varnish_purge_all_callback' ); - Vulnerable Function: The callback (e.g.,
clp_varnish_purge_all_callback) is executed. - Missing Check: The function performs logic (e.g., sending a
PURGErequest to a local Varnish instance or calling a system command) without verifying the requester's capabilities viacurrent_user_can( 'manage_options' ). - Sink: The cache is purged or a purge command is sent.
4. Nonce Acquisition Strategy
If the plugin implements a nonce check (check_ajax_referer) but fails the authorization check, the nonce must be retrieved.
- Search for Nonce Registration:
Identify where the nonce is created and localized using:grep -rn "wp_create_nonce" . - Identify Localization Key:
Look forwp_localize_scriptcalls. For example:wp_localize_script( 'clp-js', 'clp_obj', array( 'nonce' => wp_create_nonce('clp_purge_nonce') ) ); - Trigger Script Loading:
Identify if the script loads only on specific pages (e.g., the plugin settings page). - Extraction:
- If the nonce is exposed on the frontend, navigate to the site.
- If it's only in the admin, and the vulnerability is unauthenticated, the nonce might be missing entirely or the check might be flawed.
- Note: If
check_ajax_refereris present, it usually requires a nonce. If the vulnerability is truly unauthenticated, the nonce check is likely absent or the action is registered viawp_ajax_nopriv_with a publicly accessible nonce.
5. Exploitation Strategy
The agent should follow these steps:
Step 1: Discovery
Search the plugin files for the vulnerable action:
grep -rn "wp_ajax_nopriv" wp-content/plugins/clp-varnish-cache/
grep -rn "admin_init" wp-content/plugins/clp-varnish-cache/
Identify the callback function and check for current_user_can.
Step 2: Identifying the Purge Action
Examine the callback function. Note the action name (e.g., clp_varnish_purge_all) and any required parameters or nonces.
Step 3: Constructing the Payload
If the action is clp_varnish_purge_all and no nonce is required:
- Method: POST
- URL:
http://<target>/wp-admin/admin-ajax.php - Body (URL Encoded):
action=clp_varnish_purge_all
Step 4: Execution
Use the http_request tool to send the purge request.
6. Test Data Setup
- Install the
clp-varnish-cacheplugin version 1.0.2. - Activate the plugin.
- (Optional) Configure a dummy Varnish IP in the plugin settings to ensure the code path for purging is fully executed.
7. Expected Results
- Response Code:
200 OK(WordPress AJAX typically returns 200 even on logical failure). - Response Body: Likely a JSON response like
{"success":true}or a string like1orCache Purged. - Behavior: The plugin logic that connects to Varnish and sends a
PURGEorBANrequest is triggered.
8. Verification Steps
- Check Output: Inspect the HTTP response body from the
http_requesttool. - Verify via Logs: If possible, check the WordPress debug log (
wp-content/debug.log) for messages indicating the purge function was executed. - Code Analysis Verification:
Confirm the function name and lack of capability check:cat wp-content/plugins/clp-varnish-cache/<found_file>.php
Verify thatcurrent_user_canis absent from the identified function.
9. Alternative Approaches
- GET Request: Some plugins handle actions via
$_GET. Try:GET /wp-admin/admin-ajax.php?action=clp_varnish_purge_all - Direct Hook: If the action is in
admin_init, any request to a file in/wp-admin/(likeadmin-ajax.phporadmin-post.php) will trigger it if the correct parameters are passed. - Parameter variations: Check for parameters like
purge_all=1orclp_purge=truethat might be checked within aninitoradmin_inithook.
Summary
The CLP Varnish Cache plugin for WordPress is vulnerable to unauthorized cache purging in versions up to 1.0.2. This occurs because the plugin registers an AJAX action for purging the cache without implementing capability checks or nonce verification, allowing unauthenticated attackers to trigger the operation.
Exploit Outline
1. Identify the AJAX action name (likely `clp_varnish_purge_all`) registered by the plugin. 2. Construct a POST or GET request to the `/wp-admin/admin-ajax.php` endpoint. 3. Include the `action` parameter set to the identified purge function name. 4. Send the request without any authentication headers or WordPress nonces. 5. The server will execute the cache purge logic, typically indicated by a '1' or a success message in the response body.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.