Skip to content
Heist/ feed
Back to feed
Medium

draw.io: XSS via crafted cell label when opening a .drawio file

Type: advisorySources: OSV

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 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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-46642
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 06:00 UTC · Revision 1

Source evidence

draw.io: XSS via crafted cell label when opening a .drawio file

core-osv · Original source

Published 10 Jun 2026, 17:42 UTC

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 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.

osv:CVE-2026-46642
Complete source record
{
  "id": "6efc21f0e7ed729fe64776a7a246b1fcc311609d39923cebdd9c21af43282fe4",
  "url": "https://osv.dev/vulnerability/CVE-2026-46642",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "draw.io: XSS via crafted cell label when opening a .drawio file",
    "summary": "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 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.",
    "evidence": "osv:CVE-2026-46642",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-46642",
      "aliases": [
        "CVE-2026-46642",
        "GHSA-fqhg-287p-c6vf"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/jgraph/drawio",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "c9904435fd1a6795f6cad5c3908ec89d9afb8fb1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "29.7.12"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "c9904435fd1a6795f6cad5c3908ec89d9afb8fb1"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v29.7.12"
                  },
                  {
                    "cpe": "cpe:2.3:a:diagrams:drawio:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "29.7.12"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v29.7.11",
            "v29.7.9",
            "v29.7.8",
            "v29.6.10",
            "v29.6.7",
            "v29.6.6",
            "v29.6.5",
            "v29.6.4",
            "v29.6.3",
            "v29.6.1",
            "v29.5.2",
            "v29.5.1",
            "v29.3.6",
            "v29.3.5",
            "v29.3.2",
            "v29.3.0",
            "v29.2.9",
            "v29.2.7",
            "v29.2.6",
            "v29.2.2",
            "v29.0.3",
            "v29.0.2",
            "v28.2.9",
            "v28.2.8",
            "v28.2.7",
            "v28.2.5",
            "v28.2.3",
            "v28.2.0",
            "v28.1.2",
            "v28.1.1",
            "v28.0.9",
            "v28.0.7",
            "v28.0.6",
            "v28.0.5",
            "v28.0.4",
            "v28.0.3",
            "v28.0.1",
            "v27.1.6",
            "v27.0.9",
            "v27.0.5",
            "v27.0.2",
            "v26.2.15",
            "v26.2.8",
            "v26.2.7",
            "v26.2.2",
            "v26.1.1",
            "v26.1.0",
            "v26.0.16",
            "v26.0.15",
            "v26.0.13",
            "v26.0.9",
            "v26.0.7",
            "v26.0.6",
            "v26.0.4",
            "v26.0.3",
            "v26.0.2",
            "v26.0.0",
            "v25.0.2",
            "v25.0.1",
            "v25.0.0",
            "v24.8.9"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46642.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.045266669Z",
      "provider": "osv",
      "references": [
        "https://github.com/jgraph/drawio/releases/tag/v29.7.12",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46642.json",
        "https://github.com/jgraph/drawio/security/advisories/GHSA-fqhg-287p-c6vf",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-46642"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46642.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-46642",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 518425,
  "published_at": "2026-06-10T17:42:02.156+00:00"
}