# CVE-2026-46642: jgraph draw.io XSS in Text Format panel via crafted cell label

Source: https://junglewise.ai/threats/cve-2026-46642-jgraph-draw-io-xss-in-text-format-panel-via-crafted-cell-label  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-10. Updated: 2026-06-10  
License: CC BY 4.0 with a link back

CVE-2026-46642 · Severity: medium · CVSS 6.1 · Published 2026-06-10

draw.io is a popular diagramming and whiteboarding application used for creating flowcharts and technical drawings. A security flaw allows an attacker to create a malicious diagram file that, when opened by a user, executes unauthorized code within the user's browser session. This could allow an attacker to steal diagram data, access browser cookies, or redirect the user to malicious websites.

## Quick answers

**Is CVE-2026-46642 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-46642 being exploited in the wild.

**How severe is CVE-2026-46642?** Medium severity, with a CVSS score of 6.1, published 10 June 2026.

**Which products and versions are affected?** JGraph Ltd Draw.Io < 29.7.12.

**Is there a fix for CVE-2026-46642?** A patch was published on 2026-05-08: Version 29.7.12 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-46642 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-46642?** Check whether you run JGraph Ltd Draw.Io at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A Cross-Site Scripting (XSS) vulnerability exists in draw.io prior to version 29.7.12 due to improper sanitization in the 'Convert to SVG' feature-detection routine within the Text Format panel. While the primary rendering path is correctly sanitized using DOMPurify, the Format.js component assigns raw cell labels to a detached element's innerHTML property to inspect tag names. Because browsers trigger 'onerror' events for failed image loads even on detached elements, a crafted <img src=x onerror=...> payload executes immediately upon cell selection. This selection occurs automatically during file import, leading to code execution in the editor's origin. The issue is patched in version 29.7.12 by ensuring labels are sanitized before being processed by the Format panel.

## Affected products

- jgraph draw.io < 29.7.12

## Timeline

- 2026-05-08: patched: Version 29.7.12 released
- 2026-05-15: advisory: GitHub Security Advisory published
- 2026-06-10: disclosed: CVE-2026-46642 published to NVD

## References

- [https://github.com/jgraph/drawio/releases/tag/v29.7.12](https://github.com/jgraph/drawio/releases/tag/v29.7.12)
- [https://github.com/jgraph/drawio/security/advisories/GHSA-fqhg-287p-c6vf](https://github.com/jgraph/drawio/security/advisories/GHSA-fqhg-287p-c6vf)

## Related threats

- [jgraph draw.io open redirect and token leak in GitLab OAuth flow](https://junglewise.ai/threats/cve-2026-42195-jgraph-draw-io-open-redirect-and-token-leak-in-gitlab-oauth-flow)
