CVE-2025-21610: Basecamp Trix cross-site scripting via javascript: URL in link

CVE-2025-21610 · Severity: low · CVSS 3.1 · Published 2025-01-03

Trix is a popular JavaScript editor component used to provide rich text editing in web applications. The editor is vulnerable to cross-site scripting (XSS) attacks when a user pastes a malicious javascript: URL into the link field. An attacker can trick users into copying and pasting such a link, causing arbitrary JavaScript code to execute in the user's browser session, potentially leading to credential theft, unauthorized actions, or data exfiltration.

Technologies: trix (npm). Vendors: npm.

Quick answers

Is CVE-2025-21610 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-21610 being exploited in the wild.
How severe is CVE-2025-21610?
Low severity, with a CVSS score of 3.1, published 3 January 2025.
Which products and versions are affected?
trix (npm) SEMVER:introduced=0,fixed=2.1.12.
Is there a fix for CVE-2025-21610?
Yes. trix (npm): upgrade to 2.1.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-21610 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2025-21610?
Check whether you run trix (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • trix (npm): upgrade to 2.1.12 or later
    npm install trix@2.1.12

Technical details

Trix versions prior to 2.1.11 fail to properly sanitize or validate javascript: protocol URLs when inserted into link fields, resulting in a stored XSS vulnerability (CWE-79). An attacker exploits this by crafting a malicious javascript: URL and socially engineering a user to paste it into the Trix editor's link field. The attack requires user interaction (copying and pasting the malicious URL) and runs in the victim's browser with their session context and privileges. The vulnerability has been patched in version 2.1.12 and later; users can also mitigate by implementing strict Content Security Policy headers (e.g., script-src 'self') to prevent inline script execution.

Affected products

  • Basecamp Trix prior to 2.1.12

Identifiers

  • CVE-2025-21610
  • GHSA-j386-3444-qgwg

Timeline

  • 2025-01-03: disclosed
  • 2025-01-03: patched: version 2.1.12 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.