CVE-2026-57531 json
Milkdown < 7.21.3 DOM XSS via innerHTML Assignment
published 2026-07-24 3 mo ago modified 2026-07-27 3 mo ago also EUVD-2026-48736
- cvss
- 5.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 35%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Milkdown milkdown 7.21.3
- github.com/Milkdown/milkdown@db1ae72 commit
- github.com/Milkdown/milkdown#2410 pull request
- github.com/Milkdown/milkdown/releases/tag/v7.21.3 release
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 3 mo ago
Exploit prediction
0.40% chance of exploitation in the next 30 days, higher than 35% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.1 | 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 |
| CNA | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| CNA | 4.0 | 5.1 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Affected products
- Milkdown milkdown
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/Milkdown/milkdown/releases/tag/v7.21.3
release-notes, patch
-
github.com
/Milkdown/milkdown/pull/2410
issue-tracking, patch
-
github.com
/Milkdown/milkdown/commit/db1ae721854a0ab2f188b83cf8695702966640f1
patch
-
npmjs.com
/package/@milkdown/plugin-emoji
product
-
vulncheck.com
/advisories/milkdown-dom-xss-via-innerhtml-assignment
third-party-advisory
Sources
- CVE List CVE-2026-57531
- NVD CVE-2026-57531
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.