CVE-2026-27570
Received Received - Intake
Cross-Site Scripting in Discourse SharedAiConversation Onebox Method

Publication date: 2026-03-19

Last updated on: 2026-03-25

Assigner: GitHub, Inc.

Description
Discourse is an open-source discussion platform. Prior to versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2, the onebox method in the SharedAiConversation model renders the conversation title directly into HTML without proper sanitization. Versions 2026.3.0-latest.1, 2026.2.1, and 2026.1.2 contain a patch. As a workaround, tighten access by changing the `ai_bot_public_sharing_allowed_groups` site setting.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-19
Last Modified
2026-03-25
Generated
2026-05-07
AI Q&A
2026-03-19
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
discourse discourse From 2026.1.0 (inc) to 2026.1.2 (exc)
discourse discourse From 2026.2.0 (inc) to 2026.2.1 (exc)
discourse discourse 2026.3.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-27570 is a stored Cross-Site Scripting (XSS) vulnerability in the Discourse AI plugin, specifically in the Shared AI Conversation Onebox feature.

The vulnerability occurs because user-generated content, such as usernames and conversation titles, was rendered directly into HTML without proper sanitization or escaping. This allowed attackers to inject malicious scripts that would execute when the content was viewed.

The issue was fixed by modifying the code to apply proper HTML escaping (using ERB::Util.html_escape) to usernames and titles before rendering them in the HTML output, preventing script injection and execution.


How can this vulnerability impact me? :

This vulnerability allows an attacker with low privileges to inject malicious scripts into conversation titles or usernames that are then rendered unsanitized in HTML.

When these malicious scripts execute, they can compromise the confidentiality and integrity of information within the vulnerable Discourse system.

The impact on confidentiality and integrity is considered low, and there is no impact on availability.

Because the attack vector is network-based and requires low privileges, an attacker could exploit this remotely without user interaction.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': "This vulnerability is a stored Cross-Site Scripting (XSS) issue in the Discourse AI plugin's Shared AI Conversation Onebox feature, caused by unescaped user input in usernames and conversation titles."}, {'type': 'paragraph', 'content': 'Detection involves checking if your Discourse instance is running a vulnerable version prior to 2026.1.2, 2026.2.1, or 2026.3.0-latest.1, and if the Shared AI Conversation Onebox feature renders user-generated content without proper HTML escaping.'}, {'type': 'paragraph', 'content': 'Since the vulnerability involves stored malicious scripts in conversation titles or usernames, you can detect it by searching your database or logs for suspicious HTML or JavaScript tags in these fields.'}, {'type': 'paragraph', 'content': 'Suggested commands to detect potential exploitation or presence of malicious content include:'}, {'type': 'list_item', 'content': 'Query the database for conversation titles or usernames containing suspicious tags such as <script>, <img>, or event handlers like onerror.'}, {'type': 'list_item', 'content': "Example SQL command to find suspicious titles: SELECT id, title FROM topics WHERE title LIKE '%<script>%';"}, {'type': 'list_item', 'content': "Example SQL command to find suspicious usernames: SELECT id, username FROM users WHERE username LIKE '%<img%onerror=%';"}, {'type': 'paragraph', 'content': 'Additionally, review rendered HTML output of the Shared AI Conversation Onebox for unescaped user input that could indicate the vulnerability is present.'}] [1, 2, 3, 4]


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation is to upgrade your Discourse installation to one of the patched versions: 2026.1.2, 2026.2.1, or 2026.3.0-latest.1, which include fixes that properly escape user input in the Shared AI Conversation Onebox feature.

If upgrading immediately is not possible, a recommended workaround is to tighten access by modifying the site setting `ai_bot_public_sharing_allowed_groups` to restrict which user groups can share AI conversations publicly.

This limits exposure of the vulnerability by reducing the number of users who can inject or view potentially malicious content.

In summary, immediate steps are:

  • Upgrade Discourse to version 2026.1.2, 2026.2.1, or 2026.3.0-latest.1.
  • Restrict the `ai_bot_public_sharing_allowed_groups` site setting to limit public sharing.

Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart