CVE-2026-57531
published medium CVSS 4.0 · 5.1Milkdown < 7.21.3 DOM XSS via innerHTML Assignment
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Milkdown | — | milkdown0 to < 7.21.3 · Other versions: affected | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.1 / 10
- Severity
- medium
- Provider
- VulnCheck · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 5.4 | medium | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Milkdown | milkdown | 0 to < 7.21.3 (affected · semver)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
5- Patch Commit https://github.com/Milkdown/milkdown/commit/db1ae721854a0ab2f188b83cf8695702966640f1
- Pull Request https://github.com/Milkdown/milkdown/pull/2410
- Milkdown 7.21.3 Release Notes https://github.com/Milkdown/milkdown/releases/tag/v7.21.3
- @milkdown/plugin-emoji https://www.npmjs.com/package/@milkdown/plugin-emoji
- https://www.vulncheck.com/advisories/milkdown-dom-xss-via-innerhtml-assignment
Provider assertions
2VulnCheck · cna
Milkdown < 7.21.3 DOM XSS via innerHTML Assignment
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 7f6f6b0525442809bfc8ab6d3790446cbdc48fe7832efad3dc221c113ac0742a
- Ingested
- 23 Sep 2026, 09:21:43 UTC
- Source record
- Official CVE record