PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-57530 Milkdown CVE debrief

CVE-2026-57530 is a stored cross-site scripting vulnerability in Milkdown, a markdown editor, affecting versions before 7.21.3. The vulnerability exists in the @milkdown/preset-commonmark and @milkdown/components packages, allowing 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 vulnerability arises from the parseMarkdown runner storing raw URL values from the remark AST as href mark attributes without URL scheme validation. Additionally, the DOMPurify.sanitize call in edit-view.ts does not effectively sanitize the bare URL string, allowing javascript: payloads to pass through the link-tooltip preview component and read-only mode anchor elements unmodified. Users of Milkdown versions before 7.21.3 should be aware of this vulnerability and take steps to mitigate it.

Vendor
Milkdown
Product
Unknown
CVSS
MEDIUM 5.1
CISA KEV
Not listed in stored evidence
Original CVE published
2026-07-24
Original CVE updated
2026-07-27
Advisory published
2026-07-24
Advisory updated
2026-07-27

Who should care

Users of Milkdown versions before 7.21.3, particularly those who allow document write access, should be aware of this vulnerability and take steps to mitigate it. This includes administrators, developers, and security teams who manage or use Milkdown in their environments, as well as operators who may be impacted by the execution of arbitrary JavaScript.

Technical summary

The vulnerability arises from the parseMarkdown runner storing raw URL values from the remark AST as href mark attributes without URL scheme validation. Additionally, the DOMPurify.sanitize call in edit-view.ts does not effectively sanitize the bare URL string, allowing javascript: payloads to pass through the link-tooltip preview component and read-only mode anchor elements unmodified. This issue affects the @milkdown/preset-commonmark and @milkdown/components packages in Milkdown versions before 7.21.3.

Defensive priority

Medium-High

Recommended defensive actions

  • Update Milkdown to version 7.21.3 or later
  • Restrict document write access to trusted users
  • Implement additional security measures, such as Content Security Policy (CSP)
  • Monitor for suspicious activity and anomalous behavior
  • Review compensating controls for exposed systems while remediation is scheduled and verified
  • Check relevant monitoring, detection, and logs for exposed assets that need extra review
  • Track exceptions, retest remediated assets, and close the item only after evidence is documented

Evidence notes

The CVE record was published on 2026-07-24T20:18:02.893Z and last modified on 2026-07-27T20:37:34.230Z. The NVD entry is currently Deferred. There is limited information available about the vulnerability, and defenders should verify the affected scope and severity with the vendor. The vulnerability exists in the @milkdown/preset-commonmark and @milkdown/components packages, allowing 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.

Official resources

AI-assisted PatchSiren debrief based on the supplied source corpus. The CVE record was published on 2026-07-24T20:18:02.893Z and has not been modified since then. The NVD entry is currently Deferred.