Milkdown < 7.21.3 DOM XSS via innerHTML Assignment
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA milkdown (Milkdown) Fixed in 7.21.3
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
milkdown 7.21.3
2 records Highest priority Priority LOW 2 LOW
Other records, highest priority first
- TI-2026-41414 Milkdown < 7.21.3 Stored XSS via javascript: URL in link hrefPriority LOW 23
Timeline
- 2026-10-02 Threatist record created from CVE-2026-57531
- 2026-10-03 Alias added: GHSA-7jff-jg2j-4x95
References
More Milkdown vulnerabilities
- TI-2026-41414 Milkdown < 7.21.3 Stored XSS via javascript: URL in link href CVSS 4.0MEDIUM 5.1
Sources
- CVE-2026-57531 · CVE Program
- CVE-2026-57531 · NVD
- FIRST EPSS
- GHSA-7jff-jg2j-4x95 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences