Skip to content
Threat Feed
high advisory

Stored XSS in Sakai Conversations

The Sakai Conversations tool suffers from a stored cross-site scripting (XSS) vulnerability, CVE-2026-54049, allowing authenticated users to execute arbitrary JavaScript in the browsers of other site members.

The Sakai Conversations tool, part of the Sakai LMS framework, contains a stored XSS vulnerability (CVE-2026-54049) affecting versions 23.0 through 23.3. The vulnerability stems from the Conversations REST API failing to sanitize user-provided message input before persisting it to the database, combined with the frontend's use of LitElement's unsafeHTML() directive to render these messages.

An attacker with any authenticated site role can inject malicious payloads via the message field in the /api/sites/{siteId}/topics or /api/sites/{siteId}/topics/{topicId}/posts endpoints. When other users navigate to the affected conversation thread, the frontend renders the unsanitized HTML, resulting in arbitrary JavaScript execution within the victim's session. This vulnerability poses a significant risk to university environments, as it facilitates account takeover, unauthorized access to sensitive course data, and large-scale compromise of student accounts. A fix has been committed in commit 2696b4b48cbef2e81512f52f84f7477adff78b27.

Attack Chain

  1. Attacker authenticates to a Sakai instance with at least student-level permissions.
  2. Attacker selects a site where the Conversations tool is enabled.
  3. Attacker crafts a malicious payload containing JavaScript, such as <img src=x onerror=alert(1)>.
  4. Attacker sends an HTTP POST request to /api/sites/{siteId}/topics or /api/sites/{siteId}/topics/{topicId}/posts with the malicious payload in the message JSON field.
  5. The Conversations service layer accepts the input without sanitization and commits the raw payload to the database.
  6. A victim user navigates to the affected topic or post in the Sakai frontend.
  7. The LitElement web component fetches the data and renders the payload via unsafeHTML().
  8. The browser executes the malicious script in the context of the victim's session, leading to potential data exfiltration or session hijacking.

Impact

Successful exploitation allows an attacker to execute arbitrary code within the browsers of all users viewing the compromised thread. In a university setting, this can lead to the mass exfiltration of gradebook data, course content, and unauthorized administrative actions if a privileged user views the content. The scope includes any deployment of Sakai 23.0 through 23.3.

Recommendation

  1. Upgrade Sakai installations to a version containing the fix for CVE-2026-54049 once released.
  2. Implement strict Content Security Policy (CSP) headers to prevent the execution of unauthorized inline scripts.
  3. Deploy web application firewall (WAF) rules to detect and block common XSS payloads in JSON bodies directed at /api/sites/*/topics and /api/sites/*/topics/*/posts endpoints.
  4. Review access control lists for the Conversations tool to ensure only trusted users have the ability to contribute to threads.

Immediate actions

Review Sakai access logs for POST requests to /api/sites/*/topics for the specified pattern

Security Operations 24h

Mitigations

Upgrade to the patched version once released

immediate IT Operations

CVE-2026-54049

Detection coverage 1

Detects CVE-2026-54049 Exploitation - Stored XSS in Sakai Conversations

high

Detects potential stored XSS injection attempts via POST requests to the Sakai Conversations API containing common XSS vectors.

sigma tactics: initial_access techniques: T1190 sources: webserver

Detection queries are available on the platform. Get full rules →