GitHub Advisory Database
GHSA-22g5-r2x5-97cx
showdown allows stored cross-site scripting through table header ID injection
Details
showdown contains a stored cross-site scripting vulnerability in the parseHeaders function of src/subParsers/makehtml/tables.js that fails to properly escape table header ID attributes. Attackers can inject arbitrary HTML and script-executing SVG elements through double-quote characters in markdown table headers, achieving stored XSS when untrusted markdown is rendered with the default github flavor configuration.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| npm | showdown | All versions up to and including 2.1.0 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-59710
- https://github.com/showdownjs/showdown/issues/1046
- https://github.com/showdownjs/showdown/commit/e5cab1e9a5dcea2bb3cbf888863fa7e65ab37edf
- https://github.com/showdownjs/showdown
- https://www.vulncheck.com/advisories/showdown-stored-xss-via-unescaped-table-header-id-attribute-injection