{"id":"CVE-2024-32472","aliases":["EUVD-2024-1241","GHSA-m64q-4jqh-f72f"],"status":"published","title":"excalidraw vulnerable to a Stored XSS in excalidraw's web embed component","description":"excalidraw is an open source virtual hand-drawn style whiteboard. A stored XSS vulnerability in Excalidraw's web embeddable component. This allows arbitrary JavaScript to be run in the context of the domain where the editor is hosted. There were two vectors. One rendering untrusted string as iframe's `srcdoc` without properly sanitizing against HTML injection. Second by improperly sanitizing against attribute HTML injection. This in conjunction with allowing `allow-same-origin` sandbox flag (necessary for several embeds) resulted in the XSS. This vulnerability is fixed in 0.17.6 and 0.16.4.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00561,"percentile":0.46925,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79","CWE-80"],"published":"2024-04-17T21:23:57Z","modified":"2026-10-28T02:30:35Z","fixes":[{"ecosystem":"npm","package":"@excalidraw/excalidraw","fixed_in":["0.16.4","0.17.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@excalidraw/excalidraw","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.16.0"},{"fixed":"0.16.4"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@excalidraw/excalidraw","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.17.0"},{"fixed":"0.17.6"}]}]},{"source":"osv","ecosystem":"npm","package":"@excalidraw/excalidraw","ranges":[{"type":"SEMVER","events":[{"introduced":"0.16.0"},{"fixed":"0.16.4"}]}]},{"source":"osv","ecosystem":"npm","package":"@excalidraw/excalidraw","ranges":[{"type":"SEMVER","events":[{"introduced":"0.17.0"},{"fixed":"0.17.6"}]}]}],"products":[{"vendor":"excalidraw","product":"excalidraw"}],"references":[{"url":"https://github.com/excalidraw/excalidraw/security/advisories/GHSA-m64q-4jqh-f72f","tags":["x_refsource_CONFIRM","x_transferred","advisory","web"]},{"url":"https://github.com/excalidraw/excalidraw/commit/6be752e1b6d776ccfbd3bb9eea17463cb264121d","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/excalidraw/excalidraw/commit/988f81911ca58e3ca2583e0dd44a954dd00e09d0","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-32472","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-m64q-4jqh-f72f"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32472.json","tags":["advisory"]},{"url":"https://github.com/excalidraw/excalidraw","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-32472","title":"excalidraw vulnerable to a Stored XSS in excalidraw's web embed component","description":"excalidraw is an open source virtual hand-drawn style whiteboard. A stored XSS vulnerability in Excalidraw's web embeddable component. This allows arbitrary JavaScript to be run in the context of the domain where the editor is hosted. There were two vectors. One rendering untrusted string as iframe's `srcdoc` without properly sanitizing against HTML injection. Second by improperly sanitizing against attribute HTML injection. This in conjunction with allowing `allow-same-origin` sandbox flag (necessary for several embeds) resulted in the XSS. This vulnerability is fixed in 0.17.6 and 0.16.4.","status":"published","published":"2024-04-17T21:23:57.452Z","modified":"2024-08-02T02:13:39.129Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T14:34:15.662528Z"}],"euvd":[{"id":"EUVD-2024-1241","description":"excalidraw is an open source virtual hand-drawn style whiteboard. A stored XSS vulnerability in Excalidraw's web embeddable component. This allows arbitrary JavaScript to be run in the context of the domain where the editor is hosted. There were two vectors. One rendering untrusted string as iframe's `srcdoc` without properly sanitizing against HTML injection. Second by improperly sanitizing against attribute HTML injection. This in conjunction with allowing `allow-same-origin` sandbox flag (necessary for several embeds) resulted in the XSS. This vulnerability is fixed in 0.17.6 and 0.16.4.","status":"published","published":"2024-04-17T21:23:57Z","modified":"2024-08-02T02:13:39Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-03T03:50:23.057649Z"}],"ghsa":[{"id":"GHSA-m64q-4jqh-f72f","title":"Stored Cross-site Scripting (XSS) in excalidraw's web embed component","description":"### Summary\n\nA stored XSS vulnerability in Excalidraw's web embeddable component. This allows arbitrary JavaScript to be run in the context of the domain where the editor is hosted. \n\n### Poc\n\nInserting an embed with the below url (can be copy/pasted onto canvas to insert as embed) will log `42` to the console:\n\n```\nhttps://gist.github.com/vv=v\u003cscript\u003econsole.log(42)\u003c/script\u003e\n```\n\n### Details\n\nThere were two vectors. One rendering untrusted string as iframe's `srcdoc` without properly sanitizing against HTML injection. Second by improperly sanitizing against attribute HTML injection. This in conjunction with allowing `allow-same-origin` sandbox flag (necessary for several embeds) resulted in the XSS.\n\nFormer was fixed by no longer rendering unsafe `srcdoc` content verbatim, and instead strictly parsing the supplied content and constructing the `srcdoc` manually. The latter by sanitizing properly.\n\nThe `allow-same-origin` flag is now also set only in cases that require it, following the principle of least privilege.\n\n### Impact\n\nThis is a cross site scripting vulnerability, for more information, please see: https://portswigger.net/web-security/cross-site-scripting\n\nTwo npm `@excalidraw/excalidraw` stable version releases were affected (`0.16.x`, `0.17.x`), and both are now patched.","status":"published","published":"2024-04-17T21:32:57Z","modified":"2024-04-18T00:31:05Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:43.62603Z"}],"nvd":[{"id":"CVE-2024-32472","description":"excalidraw is an open source virtual hand-drawn style whiteboard. A stored XSS vulnerability in Excalidraw's web embeddable component. This allows arbitrary JavaScript to be run in the context of the domain where the editor is hosted. There were two vectors. One rendering untrusted string as iframe's `srcdoc` without properly sanitizing against HTML injection. Second by improperly sanitizing against attribute HTML injection. This in conjunction with allowing `allow-same-origin` sandbox flag (necessary for several embeds) resulted in the XSS. This vulnerability is fixed in 0.17.6 and 0.16.4.","status":"published","published":"2024-04-17T22:15:08.557Z","modified":"2026-06-17T07:29:41.68Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T14:09:52.184911Z"}],"osv":[{"id":"CVE-2024-32472","title":"excalidraw vulnerable to a Stored XSS in excalidraw's web embed component","description":"excalidraw is an open source virtual hand-drawn style whiteboard. A stored XSS vulnerability in Excalidraw's web embeddable component. This allows arbitrary JavaScript to be run in the context of the domain where the editor is hosted. There were two vectors. One rendering untrusted string as iframe's `srcdoc` without properly sanitizing against HTML injection. Second by improperly sanitizing against attribute HTML injection. This in conjunction with allowing `allow-same-origin` sandbox flag (necessary for several embeds) resulted in the XSS. This vulnerability is fixed in 0.17.6 and 0.16.4.","status":"published","published":"2024-04-17T21:23:57.452Z","modified":"2026-10-28T02:30:35.110978844Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79","CWE-80"],"updated_at":"2026-11-02T15:44:40.391953Z"},{"id":"GHSA-m64q-4jqh-f72f","title":"Stored Cross-site Scripting (XSS) in excalidraw's web embed component","description":"### Summary\n\nA stored XSS vulnerability in Excalidraw's web embeddable component. This allows arbitrary JavaScript to be run in the context of the domain where the editor is hosted. \n\n### Poc\n\nInserting an embed with the below url (can be copy/pasted onto canvas to insert as embed) will log `42` to the console:\n\n```\nhttps://gist.github.com/vv=v\u003cscript\u003econsole.log(42)\u003c/script\u003e\n```\n\n### Details\n\nThere were two vectors. One rendering untrusted string as iframe's `srcdoc` without properly sanitizing against HTML injection. Second by improperly sanitizing against attribute HTML injection. This in conjunction with allowing `allow-same-origin` sandbox flag (necessary for several embeds) resulted in the XSS.\n\nFormer was fixed by no longer rendering unsafe `srcdoc` content verbatim, and instead strictly parsing the supplied content and constructing the `srcdoc` manually. The latter by sanitizing properly.\n\nThe `allow-same-origin` flag is now also set only in cases that require it, following the principle of least privilege.\n\n### Impact\n\nThis is a cross site scripting vulnerability, for more information, please see: https://portswigger.net/web-security/cross-site-scripting\n\nTwo npm `@excalidraw/excalidraw` stable version releases were affected (`0.16.x`, `0.17.x`), and both are now patched.","status":"published","published":"2024-04-17T21:32:57Z","modified":"2026-09-10T03:50:12.897880448Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:51.463834Z"}]}}
