CVE-2024-54142 Cross-site Scripting via Discourse-ai SharedAiConversation onebox in Discourse
Attackers can execute arbitrary scripts in Discourse via HTML entities in shared AI conversations, requiring plugin updates or configuration changes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2024-54142?
CVE-2024-54142 is a critical cross-site scripting vulnerability in discourse-ai, published on 14 Jan 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Discourse AI is a Discourse plugin which provides a number of AI features. When sharing Discourse AI Bot conversations into posts, if the conversation had HTML entities those could leak into the Discourse application when a user visited a post with a onebox to said conversation. This issue has been addressed in commit `92f122c`. Users are advised to update. Users unable to update may remove all groups from `ai bot public sharing allowed groups` site setting.
Weakness: CWE-79
Which versions are affected by CVE-2024-54142?
How do I fix CVE-2024-54142?
No fix has been published for CVE-2024-54142 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-54142 being exploited?
There is no known exploitation of CVE-2024-54142 in the wild and no public exploit code.
Sources
Also known as GHSA-94c2-qr2h-88jv.