Miggo Logo

CVE-2024-53847:
Trix editor subject to XSS vulnerabilities on copy & paste

5.1

CVSS Score
4.0

Basic Information

EPSS Score
0.37103%
Published
12/9/2024
Updated
12/9/2024
KEV Status
No
Technology
TechnologyJavaScript

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 NameEcosystemVulnerable VersionsFirst Patched Version
trixnpm>= 2.0.0, < 2.1.92.1.9
trixnpm>= 1.0.0, < 1.3.31.3.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** Trix **itor, in v*rsions prior to *.*.* *n* *.*.*, is vuln*r**l* to XSS + mut*tion XSS *tt**ks w**n p*stin* m*li*ious *o**. ### Imp**t *n *tt**k*r *oul* tri*k * us*r to *opy *n* p*st* m*li*ious *o** t**t woul* *x**ut* *r*itr*ry J*v*S*ript *o**

Reasoning

T** vuln*r**ility st*ms *rom in***qu*t* *TML s*nitiz*tion *urin* p*st* op*r*tions. T** *ommit *i** s*ows t** p*t**** v*rsion intro*u*** `*OMPuri*y` in `*TMLS*nitiz*r.s*nitiz*()`, in*i**tin* t*is w*s t** vuln*r**l* point. T** pr*-p*t** impl*m*nt*tion