CVE-2024-32472:
Stored Cross-site Scripting (XSS) in excalidraw's web embed component
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.33515%
CWE
Published
4/17/2024
Updated
4/18/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@excalidraw/excalidraw | npm | >= 0.16.0, < 0.16.4 | 0.16.4 |
@excalidraw/excalidraw | npm | >= 0.17.0, < 0.17.6 | 0.17.6 |
Vulnerability Intelligence
Miggo AI
Root 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.