CVE-2024-53847 Trix vulnerable to Cross-site Scripting on copy & paste
An attacker can execute arbitrary JavaScript via malicious copy-paste content in the Trix editor, risking session hijacking or data theft.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-53847?
CVE-2024-53847 is a medium-severity cross-site scripting vulnerability in basecamp trix, published on 9 Dec 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
The Trix rich text editor, prior to versions 2.1.9 and 1.3.3, is vulnerable to cross-site scripting (XSS) + mutation XSS attacks when pasting malicious code. An attacker could trick a user to copy and paste malicious code that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed. Users should upgrade to Trix editor version 2.1.9 or 1.3.3, which uses DOMPurify to sanitize the pasted content.
Weakness: CWE-79
Which versions are affected by CVE-2024-53847?
4 open source packages ship an affected version, including trix.
| Package | Affected | Fixed in |
|---|---|---|
trix npm | From 1.0.0 | 1.3.3 |
trix npm | From 1.0.0 | 1.3.3 |
trix npm | From 2.0.0 | 2.1.9 |
trix npm | From 2.0.0 | 2.1.9 |
How do I fix CVE-2024-53847?
Upgrade trix to a fixed version for your release line: 1.3.3 or 2.1.9.
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-53847 being exploited?
There is no known exploitation of CVE-2024-53847 in the wild and no public exploit code.
Sources
Also known as GHSA-6vx4-v2jw-qwqh.