The vulnerability is a classic stored Cross-Site Scripting (XSS) issue within the DNN Platform's Activity Feed (also known as the Journal). The root cause is the failure to properly HTML-encode user-supplied data before rendering it on the web page. The investigation of the patch commit 34290ec669355195dbdf972c73b75ddb490d7ade reveals the exact locations of the vulnerability.
The core of the issue lies in the DotNetNuke.Modules.Journal.Components.JournalParser class. Several methods within this class (GetList, GetLikeListHTML, GetCommentRow) were responsible for constructing HTML fragments for the activity feed by concatenating raw user data (like display names, profile URLs, and comments) directly into HTML strings. The patch explicitly adds calls to WebUtility.HtmlEncode in these locations to neutralize any embedded scripts.
A contributing factor was the token replacement system. The change in JournalItemTokenReplace from AddPropertySource to AddRawPropertySource suggests that the previous encoding mechanism was flawed, likely leading to double-encoding issues that complicated and obscured the need for proper, consistent output encoding in the JournalParser. By removing the encoding from the tokenization step and applying it at the final rendering step, the fix ensures that all dynamic data is safely displayed as text rather than being executed as HTML or script by the browser.
An attacker could exploit this by creating a specially crafted profile name, comment, or other input that includes JavaScript. When this malicious content is viewed by other users in the Activity Feed, the script would execute in their browser, potentially leading to session hijacking, data theft, or further attacks. The identified vulnerable functions are the exact points in the code where this malicious input was processed and rendered without sanitization.