# CVE-2026-57531: Milkdown < 7.21.3 DOM XSS via innerHTML Assignment

- Severity: Medium 5.1 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2026-07-24T19:10:05.984Z
- Modified: 2026-07-27T20:37:34.230Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: VulnCheck

## Description

Milkdown before 7.21.3 contains a DOM cross-site scripting vulnerability in the @milkdown/plugin-emoji package that 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, causing payload execution on every markdown serialization cycle.

(As written by CVE List.)

## Affected

- Milkdown milkdown: before 7.21.3

## Every score

- VulnCheck: CVSS:4.0 5.1 Medium `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`
- VulnCheck: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/Milkdown/milkdown/releases/tag/v7.21.3> (patch, release-notes)
- <https://github.com/Milkdown/milkdown/pull/2410> (issue-tracking, patch)
- <https://github.com/Milkdown/milkdown/commit/db1ae721854a0ab2f188b83cf8695702966640f1> (patch)
- <https://www.npmjs.com/package/@milkdown/plugin-emoji> (product)
- <https://www.vulncheck.com/advisories/milkdown-dom-xss-via-innerhtml-assignment> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-57531](https://www.cve.org/CVERecord?id=CVE-2026-57531), CVE Terms of Use, modified 2026-07-25
- NVD: [CVE-2026-57531](https://nvd.nist.gov/vuln/detail/CVE-2026-57531), Public domain, modified 2026-07-27

---

Page: https://cve.day/CVE-2026-57531 · Whole record: https://cve.day/CVE-2026-57531.json · Rebuilt by cve.day 2026-11-25T22:59:30.032Z
