CVE-2024-53847:
Trix editor subject to XSS vulnerabilities on copy & paste
5.1
CVSS Score
4.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.37103%
CWE
Published
12/9/2024
Updated
12/9/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
trix | npm | >= 2.0.0, < 2.1.9 | 2.1.9 |
trix | npm | >= 1.0.0, < 1.3.3 | 1.3.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from inadequate HTML sanitization during paste operations. The commit diff shows the patched version introduced DOMPurify
in HTMLSanitizer.sanitize()
, indicating this was the vulnerable point. The pre-patch implementation only handled basic element checks and list nesting normalization, failing to properly sanitize dangerous HTML constructs in data-trix-attachment content. The added test cases demonstrate exploitation via MathML
and embed elements, which would have been inadequately processed by the original sanitize
method.