Cross-site scripting in Discourse - CVE-2026-27740

 

Cross-site scripting in Discourse - CVE-2026-27740

Published: July 1, 2026


Vulnerability identifier: #VU136157
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U/U:Clear
CVE-ID: CVE-2026-27740
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Civilized Discourse Construction Kit, Inc.
Affected software:
Discourse

Detailed vulnerability description

The vulnerability allows a remote user to execute arbitrary script code in a staff member's browser.

The vulnerability exists due to improper neutralization of script-related html tags in the Review Queue interface when rendering raw AI LLM output with htmlSafe. A remote user can use prompt injection techniques to cause the AI to return a malicious payload to execute arbitrary script code in a staff member's browser.

User interaction is required when a staff member views the flagged post in the Review Queue.


How to mitigate CVE-2026-27740

Install security update from vendor's website.

Sources