CVE-2025-46812 Trix vulnerable to Cross-site Scripting on copy & paste
An attacker can execute arbitrary JavaScript in a user's session by tricking them into pasting malicious code into the Trix editor.
- 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-2025-46812?
CVE-2025-46812 is a low-severity cross-site scripting vulnerability in basecamp trix, published on 8 May 2025. 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
Trix is a what-you-see-is-what-you-get rich text editor for everyday writing. Versions prior to 2.1.15 are vulnerable to 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. This issue has been patched in version 2.1.15.
Weakness: CWE-79
Which versions are affected by CVE-2025-46812?
2 open source packages ship an affected version, including trix.
| Package | Affected | Fixed in |
|---|---|---|
trix npm | All versions | 2.1.15 |
trix npm | All versions | 2.1.15 |
How do I fix CVE-2025-46812?
Upgrade trix to 2.1.15 or later.
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-2025-46812 being exploited?
There is no known exploitation of CVE-2025-46812 in the wild and no public exploit code.
Sources
Also known as GHSA-mcrw-746g-9q8h.