CVE-2026-57530 Milkdown < 7.21.3 Stored XSS via javascript: URL in link href
Attackers with document write access can execute arbitrary JavaScript in other users' browsers via malicious links in Milkdown documents.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-57530?
CVE-2026-57530 is a medium-severity cross-site scripting vulnerability in milkdown, published on 24 Jul 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-79
Which versions are affected by CVE-2026-57530?
How do I fix CVE-2026-57530?
No fix has been published for CVE-2026-57530 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-57530 being exploited?
There is no known exploitation of CVE-2026-57530 in the wild and no public exploit code.
Sources
Also known as GHSA-f8jw-52vm-m867.