Miggo Logo

CVE-2024-32472:
Stored Cross-site Scripting (XSS) in excalidraw's web embed component

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.33515%
Published
4/17/2024
Updated
4/18/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
@excalidraw/excalidrawnpm>= 0.16.0, < 0.16.40.16.4
@excalidraw/excalidrawnpm>= 0.17.0, < 0.17.60.17.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from two key issues: 1) Unsafe handling of user-controlled input in iframe srcdoc construction (via getEmbedLink), and 2) Improper sandbox policy management tied to domain validation (via validateHostname). The commit diff shows critical changes to these functions - introducing strict allowlists (ALLOW_SAME_ORIGIN set), modifying sandbox attribute handling, and replacing direct srcdoc insertion with controlled construction. The pre-patch versions of these functions lacked proper input sanitization and least-privilege sandbox policies, enabling the XSS vectors described.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry * stor** XSS vuln*r**ility in *x**li*r*w's w** *m******l* *ompon*nt. T*is *llows *r*itr*ry J*v*S*ript to ** run in t** *ont*xt o* t** *om*in w**r* t** **itor is *ost**. ### Po* Ins*rtin* *n *m*** wit* t** **low url (**n ** *opy/p*st**

Reasoning

T** vuln*r**ility st*mm** *rom two k*y issu*s: *) Uns*** **n*lin* o* us*r-*ontroll** input in i*r*m* sr**o* *onstru*tion (vi* **t*m***Link), *n* *) Improp*r s*n**ox poli*y m*n***m*nt ti** to *om*in v*li**tion (vi* v*li**t**ostn*m*). T** *ommit *i** s