/

CVE-2026-54049

Severity:

HIGH RISK

(8.7)

Stored XSS (CWE-79) in Sakai Conversations Tool Feature

CVE-2026-54049

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-Side Code Execution and Session Abuse

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Sakai Conversations stores topic and post content without HTML sanitization and renders it with an unsafe HTML directive, enabling stored cross-site scripting.

An authenticated user with access to an enabled Conversations tool may inject content that executes JavaScript in the browsers of other users who view the affected topic or post.

Affected context

The vulnerability occurs in Sakai Conversations deployments using affected 23.x or 25.x releases. It requires a site where the Conversations tool is enabled and where an authenticated user can create or modify topics or posts. Risk arises when stored message content is later rendered in other users' browsers without effective HTML and script sanitization.

Exploit preconditions

  • Attack surface: Sakai Conversations topic and post rendering
  • Required access: An authenticated account with permission to access a site and submit or modify Conversation content
  • Trigger point: Another user views the topic or post containing the stored content
  • Why exploitation is possible: Submitted content is stored without adequate sanitization and is rendered through a frontend path that permits unsafe HTML

Why this happens

The underlying bug is a mismatch between untrusted user-generated content and a rendering mechanism designed to interpret HTML. Sakai stores topic and post messages without applying an appropriate sanitization policy, while the frontend uses LitElement's unsafeHTML() directive to render the content. This insecure pattern maps to CWE-79: Improper Neutralization of Input During Web Page Generation, because attacker-controlled data can become active markup or script in another user's browser.

Potential impact

  • Execution of attacker-controlled script in the context of a Sakai session
  • Theft of accessible user data or session-related information
  • Unauthorized actions performed through a victim's browser
  • Defacement or manipulation of Conversation content
  • Phishing, malware delivery, or broader compromise of users who view affected posts

General mitigation guidance

Mitigation generally focuses on treating all user-generated message content as untrusted and preventing unsafe interpretation in the browser.

Common defensive patterns include:

  • Applying context-aware, allowlist-based HTML sanitization before storage or rendering
  • Rendering plain text by default when rich content is not required
  • Avoiding unsafe HTML rendering directives for untrusted content
  • Enforcing output encoding appropriate to the rendering context
  • Applying defense-in-depth browser policies, such as a restrictive Content Security Policy
  • Limiting authoring and editing permissions according to least privilege
  • Preserving sanitized-content guarantees consistently across API, storage, and frontend layers

How teams detect issues like this

Organizations can look for stored XSS risks through:

  • Static analysis rules identifying unsafe HTML rendering APIs and directives
  • Code review checks for user-controlled data flowing into HTML-capable sinks
  • Tests that submit markup and script-like content through topic and post fields, then verify safe rendering
  • Review of sanitization and encoding policies across storage, API, and frontend boundaries
  • Content-security and web-application monitoring for unexpected script execution or suspicious markup
  • CI policy enforcement requiring approved sanitization libraries and rejecting unsafe rendering patterns

Sources

SourceLink
github.comgithub.com/sakaiproject/sakai/commit/2696b4b48cbef2e81512f52f84f7477adff78b27
github.comgithub.com/sakaiproject/sakai/security/advisories/GHSA-w2x5-gv52-9ccv

Frequently asked

questions

An authenticated user who can submit or modify content in a Sakai site with the Conversations tool enabled may be able to store malicious content for other users to view.

No. Stored content can affect any user who later views the relevant topic or post, subject to access controls and browser behavior.

Treat message content as untrusted, prefer plain-text rendering, and use a strict allowlist sanitizer whenever approved rich HTML is necessary. Avoid unsafe HTML rendering for uncontrolled input.

Combine context-aware output encoding, centralized sanitization policies, secure frontend rendering defaults, least-privilege authoring controls, and automated tests for stored XSS flows.

Find out what's already
exploitable in your codebase.