{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "7.21.3"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0f85d3bb107e843707f88e2475baeba1041adb43"
            }
          ],
          "repo": "https://github.com/milkdown/milkdown",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57530.json"
  },
  "details": "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.",
  "id": "CVE-2026-57530",
  "modified": "2026-07-26T05:12:18.163633433Z",
  "published": "2026-07-24T19:08:20.323Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57530.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Milkdown/milkdown"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Milkdown/milkdown/commit/db1ae721854a0ab2f188b83cf8695702966640f1"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Milkdown/milkdown/pull/2410"
    },
    {
      "type": "FIX",
      "url": "https://github.com/Milkdown/milkdown/releases/tag/v7.21.3"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-57530"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/package/@milkdown/components"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/package/@milkdown/preset-commonmark"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/milkdown-stored-xss-via-javascript-url-in-link-href"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Milkdown \u003c 7.21.3 Stored XSS via javascript: URL in link href"
}