{"id":"CVE-2026-57531","aliases":["CVE-2026-57531"],"related":[],"kind":"vulnerability","state":"published","title":"Milkdown < 7.21.3 DOM XSS via innerHTML Assignment","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-07-24T19:10:05.984Z","modified":"2026-07-27T20:37:34.230Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":5.1,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"7.21.3","status":"affected"}],"vendor":"Milkdown","product":"milkdown","repo":"https://github.com/Milkdown/milkdown","source":"cvelist"}],"references":[{"url":"https://github.com/Milkdown/milkdown/releases/tag/v7.21.3","tags":["patch","release-notes"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Milkdown/milkdown/pull/2410","tags":["issue-tracking","patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Milkdown/milkdown/commit/db1ae721854a0ab2f188b83cf8695702966640f1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://www.npmjs.com/package/@milkdown/plugin-emoji","tags":["product"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/milkdown-dom-xss-via-innerhtml-assignment","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["Katriel Moses"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-25T00:59:18.071Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-57531","url":"https://www.cve.org/CVERecord?id=CVE-2026-57531","licence":"CVE Terms of Use","modified":"2026-07-25T10:30:03.580Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-57531","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57531","licence":"Public domain","modified":"2026-07-27T20:37:34.230Z"}],"updatedAt":"2026-11-25T22:59:30.032Z","epss":{"score":0.00249,"percentile":0.17398,"date":"2026-12-01T12:00:22.000Z"}}