Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97224 Overview
CVE-2026-97224 is a cross-site scripting (XSS) vulnerability affecting Excalidraw versions up to 0.18.1. The flaw resides in an unknown function within packages/excalidraw/data/restore.ts, part of the Imported File Handler component. Attackers can manipulate the customData.generationData.html argument to inject arbitrary script content that executes in the victim's browser context.
The issue is tracked under CWE-79: Improper Neutralization of Input During Web Page Generation. Exploitation requires user interaction, such as opening a crafted Excalidraw file. Public exploit details are available, and the vendor did not respond to coordinated disclosure attempts.
Critical Impact
Remote attackers can execute arbitrary JavaScript in a victim's browser session by convincing the user to import a malicious Excalidraw file.
Affected Products
- Excalidraw versions up to and including 0.18.1
- Component: Imported File Handler (packages/excalidraw/data/restore.ts)
- Deployments embedding the vulnerable Excalidraw package in web applications
Discovery Timeline
- 2026-09-24 - CVE CVE-2026-97224 published to NVD
- 2026-09-24 - Last updated in NVD database
Technical Details for CVE-2026-97224
Vulnerability Analysis
The vulnerability exists in Excalidraw's file restoration logic. When the application processes an imported .excalidraw file, it reads the customData.generationData.html property without proper sanitization or output encoding. The unsanitized HTML content is then rendered in the browser, allowing injected <script> tags and event handlers to execute.
This is a client-side XSS condition affecting any web application that embeds the Excalidraw package and permits file imports. The injected script runs in the origin of the hosting application, which may expose session cookies, local storage data, or allow actions on behalf of the authenticated user.
According to the Exploit Prediction Scoring System (EPSS), the probability of exploitation activity in the next 30 days is 0.263%.
Root Cause
The root cause is improper neutralization of user-controlled HTML during file restoration. The restore.ts module trusts the customData.generationData.html field inside imported files and passes its contents to the DOM without encoding or filtering. No sanitization library or Content Security Policy enforcement blocks the payload before rendering.
Attack Vector
An attacker crafts a malicious Excalidraw file containing a payload in the customData.generationData.html field. The attacker then delivers the file through email, chat, a shared drawing link, or a compromised collaboration workspace. When the victim imports the file in a vulnerable Excalidraw instance, the embedded script executes in their browser.
For technical specifics and reproduction steps, refer to the VulDB entry for CVE-2026-97224 and the VulDB Vulnerability #409318 report.
Detection Methods for CVE-2026-97224
Indicators of Compromise
- Imported .excalidraw or JSON files containing a customData.generationData.html field with <script> tags, on* event handlers, or javascript: URIs
- Browser console errors or Content Security Policy violations originating from the Excalidraw canvas or import handlers
- Outbound requests from users' browsers to attacker-controlled domains shortly after opening an Excalidraw file
Detection Strategies
- Inspect uploaded Excalidraw files at the application gateway for HTML or script content in customData fields before passing them to clients
- Monitor web application logs for anomalous DOM manipulation errors tied to the restore workflow in packages/excalidraw/data/restore.ts
- Correlate file-upload events with subsequent suspicious browser-originated network traffic
Monitoring Recommendations
- Enable CSP reporting endpoints to capture violations triggered by inline scripts rendered inside Excalidraw canvases
- Alert on first-time user interactions with imported Excalidraw files that trigger unexpected JavaScript execution
- Track Excalidraw package versions deployed across internal and third-party web assets to identify unpatched instances
How to Mitigate CVE-2026-97224
Immediate Actions Required
- Inventory all deployments that embed the Excalidraw package and identify instances at version 0.18.1 or earlier
- Restrict or disable Excalidraw file import functionality until a patched release is deployed
- Deploy a strict Content Security Policy that forbids inline scripts and limits script sources on pages hosting Excalidraw
Patch Information
No vendor advisory or patched release has been published. The vendor was contacted prior to disclosure and did not respond. Monitor the VulDB CVE-2026-97224 entry for updates and the upstream Excalidraw repository for a fix beyond version 0.18.1.
Workarounds
- Sanitize imported Excalidraw files server-side by stripping or encoding the customData.generationData.html field before delivery to clients
- Apply a DOM sanitizer such as DOMPurify to any HTML rendered from imported file data
- Enforce a Content Security Policy with script-src 'self' and no unsafe-inline directives on pages that render Excalidraw content
- Train users to avoid importing Excalidraw files from untrusted sources
# Example Content-Security-Policy header to limit XSS impact
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

