CVE-2026-46642: draw.io: XSS via crafted cell label when opening a .drawio file

Published Jun 10, 2026
·
Updated

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.

Affected Software

2 affected components
jgraph draw.io<29.7.12
Diagrams Drawio<29.7.12

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade draw.io to a version that resolves this vulnerability.

    Fixed in 29.7.12

Event History

Jun 10, 2026
CVE Published
via MITRE·05:42 PM
Data Sourced
via MITRE·05:42 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:17 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-46642?

The severity of CVE-2026-46642 is medium with a score of 6.1.

2

What type of vulnerability is associated with CVE-2026-46642?

CVE-2026-46642 is an XSS vulnerability that allows arbitrary JavaScript execution.

3

How do I fix CVE-2026-46642?

To fix CVE-2026-46642, upgrade to draw.io version 29.7.12 or later.

4

What can be exploited in CVE-2026-46642?

The vulnerability allows crafted .drawio files to execute JavaScript when opened in the editor.

5

Is there a workaround for CVE-2026-46642 before upgrading?

Currently, there are no known effective workarounds for CVE-2026-46642 other than upgrading the software.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203