CVE-2025-21610: Trix allows Cross-site Scripting via `javascript:` url in a link
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.15586%
CWE
Published
1/3/2025
Updated
1/3/2025
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| trix | npm | < 2.1.12 | 2.1.12 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The core vulnerability exists in href attribute handling within the toolbar controller. The commit adds DOMPurify validation specifically for href attributes in setAttribute, introduces a data-trix-validate-href flag, and adds XSS-specific tests. The pre-patch code lacked proper validation of javascript: URIs in href attributes during link creation/editing, which is directly addressed by the added safeAttribute/isSafeAttribute checks using DOMPurify's validation.