Discourse
cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*
- >= 2026.2.0-latest
- >= 2026.1.0-latest
A stored cross-site scripting vulnerability has been identified in Discourse versions prior to 2026.3.0-latest.1, 2026.2.1, and 2026.1.2. The issue arises in the onebox method of the SharedAiConversation model, where conversation titles are rendered directly into HTML without adequate sanitization. This flaw allows for the injection of malicious scripts that could be executed in the context of the user.
Exploitation of this vulnerability allows for stored cross-site scripting, where injected scripts are executed in the context of the user.
To reproduce this vulnerability, update a topic's title with a malicious payload, such as a script tag or an image tag with an event handler, and then share the conversation using the AI onebox feature. The injected script will be executed when the onebox is rendered.
Users can upgrade to Discourse versions 2026.3.0-latest.1, 2026.2.1, or 2026.1.2, all of which include the necessary patch. Alternatively, access can be tightened by adjusting the 'ai_bot_public_sharing_allowed_groups' site setting.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.