PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-57531 Milkdown CVE debrief

CVE-2026-57531 is a DOM cross-site scripting vulnerability in the @milkdown/plugin-emoji package of Milkdown before 7.21.3. The vulnerability allows unauthenticated attackers to execute arbitrary JavaScript in the host application's origin by causing a victim to paste attacker-controlled content. This vulnerability has a CVSS score of 5.1 and a CVSS severity of MEDIUM. The vulnerability is caused by the parseDOM.getAttrs handler storing raw innerHTML of pasted span elements with data-type='emoji' without sanitization, and the toMarkdown runner subsequently assigning this unsanitized value directly to a live DOM element's innerHTML, bypassing the DOMPurify sanitization used in the toDOM path.

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

Developers and users of Milkdown versions before 7.21.3 should be aware of this vulnerability and take necessary actions to mitigate it. This includes updating Milkdown to version 7.21.3 or later, implementing additional sanitization for user-input content, and monitoring for suspicious activity related to the @milkdown/plugin-emoji package.

Technical summary

The parseDOM.getAttrs handler stores raw innerHTML of pasted span elements with data-type='emoji' without sanitization, and the toMarkdown runner subsequently assigns this unsanitized value directly to a live DOM element's innerHTML, bypassing the DOMPurify sanitization used in the toDOM path. This allows unauthenticated attackers to execute arbitrary JavaScript in the host application's origin by causing a victim to paste attacker-controlled content. The vulnerability affects Milkdown versions before 7.21.3.

Defensive priority

Medium

Recommended defensive actions

  • Update Milkdown to version 7.21.3 or later
  • Implement additional sanitization for user-input content
  • Monitor for suspicious activity related to the @milkdown/plugin-emoji package
  • 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
  • Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up

Evidence notes

The CVE record was published on 2026-07-24T20:18:03.530Z 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 @milkdown/plugin-emoji package is used in Milkdown before 7.21.3, which is vulnerable to DOM cross-site scripting. The vulnerability allows unauthenticated attackers to execute arbitrary JavaScript in the host application's origin by causing a victim to paste attacker-controlled content. The parseDOM.getAttrs handler stores raw innerHTML of pasted span elements with data-type='emoji' without sanitization, and the toMarkdown runner subsequently assigns this unsanitized value directly to a live DOM element's innerHTML, bypassing the DOMPurify sanitization used in the toDOM path.

Official resources

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