{"id":"CVE-2026-57530","summary":"Milkdown \u003c 7.21.3 Stored XSS via javascript: URL in link href","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.","modified":"2026-07-27T04:02:34.972851696Z","published":"2026-07-24T19:08:20.323Z","database_specific":{"cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57530.json","cna_assigner":"VulnCheck"},"references":[{"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://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57530.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57530"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/milkdown-stored-xss-via-javascript-url-in-link-href"},{"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":"PACKAGE","url":"https://github.com/Milkdown/milkdown"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/milkdown/milkdown","events":[{"introduced":"0"},{"fixed":"0f85d3bb107e843707f88e2475baeba1041adb43"},{"fixed":"db1ae721854a0ab2f188b83cf8695702966640f1"}],"database_specific":{"source":["DESCRIPTION","REFERENCES"],"extracted_events":[{"introduced":"0"},{"fixed":"7.21.3"}]}}],"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"}}],"schema_version":"1.7.5","severity":[{"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"}]}