Skip to content
Heist/ feed
Back to feed
Medium

Milkdown < 7.21.3 Stored XSS via javascript: URL in link href

Type: advisorySources: OSV

Milkdown before 7.21.3 contains a stored cross-site scripting vulnerability in the @milkdown/preset-commonmark and @milkdown/components packages that allows attackers with document write access to execute arbitrary JavaScript in the browser context of any user who opens the document or clicks a rendered link. The parseMarkdown runner stores raw URL values from the remark AST as href mark attributes without URL scheme validation, and the ineffective DOMPurify.sanitize call in edit-view.ts treats the bare URL string as a text node and returns it unchanged, allowing javascript: payloads to pass through the link-tooltip preview component and read-only mode anchor elements unmodified.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-57530
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 20:28 UTC · Revision 1

Source evidence

Milkdown < 7.21.3 Stored XSS via javascript: URL in link href

core-osv · Original source

Published 24 Jul 2026, 19:08 UTC

Milkdown before 7.21.3 contains a stored cross-site scripting vulnerability in the @milkdown/preset-commonmark and @milkdown/components packages that allows attackers with document write access to execute arbitrary JavaScript in the browser context of any user who opens the document or clicks a rendered link. The parseMarkdown runner stores raw URL values from the remark AST as href mark attributes without URL scheme validation, and the ineffective DOMPurify.sanitize call in edit-view.ts treats the bare URL string as a text node and returns it unchanged, allowing javascript: payloads to pass through the link-tooltip preview component and read-only mode anchor elements unmodified.

osv:CVE-2026-57530
Complete source record
{
  "id": "75b55cb2a84f20302cf60c813e1706b68b3175eb952a2c00ac9efdfdf2fde741",
  "url": "https://osv.dev/vulnerability/CVE-2026-57530",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Milkdown < 7.21.3 Stored XSS via javascript: URL in link href",
    "summary": "Milkdown before 7.21.3 contains a stored cross-site scripting vulnerability in the @milkdown/preset-commonmark and @milkdown/components packages that allows attackers with document write access to execute arbitrary JavaScript in the browser context of any user who opens the document or clicks a rendered link. The parseMarkdown runner stores raw URL values from the remark AST as href mark attributes without URL scheme validation, and the ineffective DOMPurify.sanitize call in edit-view.ts treats the bare URL string as a text node and returns it unchanged, allowing javascript: payloads to pass through the link-tooltip preview component and read-only mode anchor elements unmodified.",
    "evidence": "osv:CVE-2026-57530",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-57530",
      "aliases": [
        "CVE-2026-57530"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/milkdown/milkdown",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0f85d3bb107e843707f88e2475baeba1041adb43"
                },
                {
                  "fixed": "db1ae721854a0ab2f188b83cf8695702966640f1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "7.21.3"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0f85d3bb107e843707f88e2475baeba1041adb43"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v7.21.3"
                  },
                  {
                    "range": [
                      {
                        "fixed": "db1ae721854a0ab2f188b83cf8695702966640f1"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v7.21.2",
            "v7.21.1",
            "v7.21.0",
            "v7.20.0",
            "v7.19.2",
            "v7.19.1",
            "v7.19.0",
            "v7.18.0",
            "v7.17.3",
            "v7.17.2",
            "v7.17.1",
            "v7.17.0",
            "v7.16.0",
            "v7.15.5",
            "v7.15.4",
            "v7.15.3",
            "v7.15.2",
            "v7.15.1",
            "v7.15.0",
            "v7.14.0",
            "v7.13.2",
            "v7.13.1",
            "v7.13.0",
            "v7.12.1",
            "v7.12.0",
            "v7.11.1",
            "v7.11.0",
            "v7.10.5",
            "v7.10.4",
            "v7.10.3",
            "v7.10.2",
            "v7.10.1",
            "v7.10.0",
            "v7.9.1",
            "v7.9.0",
            "v7.8.0",
            "v7.7.0",
            "v7.6.4",
            "v7.6.3",
            "v7.6.2",
            "v7.6.1",
            "v7.6.0",
            "v7.5.9",
            "v7.5.8",
            "v7.5.5",
            "v7.5.0",
            "v7.4.0",
            "v7.3.6",
            "v7.3.5",
            "v7.3.4",
            "v7.3.3",
            "v7.3.2",
            "v7.3.1",
            "v7.3.0",
            "v7.2.4",
            "v7.2.3",
            "v7.2.2",
            "v7.2.1",
            "v7.2.0",
            "v7.1.2-next.3",
            "v7.1.2-next.2",
            "v7.1.2-next.1",
            "v7.1.2-next.0",
            "v7.1.1",
            "v7.1.0",
            "v7.0.1",
            "v7.0.0",
            "v7.0.0-next.6",
            "v7.0.0-next.5",
            "v7.0.0-next.4",
            "v7.0.0-next.3",
            "v7.0.0-next.2",
            "v7.0.0-next.1",
            "v7.0.0-next.0",
            "v6.5.4",
            "v6.5.3",
            "v6.5.2",
            "v6.5.0",
            "v6.4.1",
            "v6.4.0",
            "v6.3.2",
            "v6.3.1",
            "v6.3.0",
            "v6.2.0",
            "v6.1.5",
            "v6.1.4",
            "v6.1.3",
            "v6.1.2",
            "v6.1.1",
            "v6.1.0",
            "v6.0.2",
            "v6.0.1",
            "v6.0.0",
            "v6.0.0-next.1",
            "v6.0.0-next.0",
            "v5.5.0",
            "v5.4.1",
            "v5.4.0",
            "v5.3.5",
            "v5.3.4",
            "v5.3.3",
            "v5.3.2",
            "v5.3.1",
            "v5.3.0",
            "v5.2.1",
            "v5.2.0",
            "v5.1.2",
            "v5.1.1",
            "v5.1.0",
            "v5.0.1",
            "v5.0.0",
            "v4.14.2",
            "v4.14.1",
            "v4.14.0",
            "v4.13.3",
            "v4.13.2",
            "v4.13.1",
            "v4.13.0",
            "v4.12.0",
            "v4.11.2",
            "v4.11.1",
            "v4.11.0",
            "v4.10.5",
            "v4.10.4",
            "v4.10.3",
            "v4.10.2",
            "v4.10.1",
            "v4.10.0",
            "v4.9.6",
            "v4.9.5",
            "v4.9.4",
            "v4.9.3",
            "v4.8.2",
            "v4.7.1",
            "v4.7.0",
            "v4.6.9",
            "v4.6.7",
            "v4.6.6",
            "v4.6.5",
            "v4.6.4",
            "v4.6.3",
            "v4.6.2",
            "v4.6.0",
            "v4.5.3",
            "v4.5.2",
            "v4.5.1",
            "v4.5.0",
            "v4.4.0",
            "v4.2.0",
            "v4.1.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-57530.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:39.243135289Z",
      "provider": "osv",
      "references": [
        "https://www.npmjs.com/package/@milkdown/components",
        "https://www.npmjs.com/package/@milkdown/preset-commonmark",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57530.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-57530",
        "https://www.vulncheck.com/advisories/milkdown-stored-xss-via-javascript-url-in-link-href",
        "https://github.com/Milkdown/milkdown/commit/db1ae721854a0ab2f188b83cf8695702966640f1",
        "https://github.com/Milkdown/milkdown/pull/2410",
        "https://github.com/Milkdown/milkdown/releases/tag/v7.21.3",
        "https://github.com/Milkdown/milkdown"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "VulnCheck",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57530.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-57530",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 506679,
  "published_at": "2026-07-24T19:08:20.323+00:00"
}