{"id":"GHSA-w32g-5hqp-gg6q","aliases":["GHSA-w32g-5hqp-gg6q"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-Site Scripting in mermaid","summary":"Versions of `mermaid` prior to 8.2.3 are vulnerable to Cross-Site Scripting. If malicious input  such as `A[\"<img src=invalid onerror=alert('XSS')></img>\"] ` is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding.\n\n\n## Recommendation\n\nUpgrade to version 8.2.3 or later","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Versions of `mermaid` prior to 8.2.3 are vulnerable to Cross-Site Scripting. If malicious input  such as `A[\"<img src=invalid onerror=alert('XSS')></img>\"] ` is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding.\n\n\n## Recommendation\n\nUpgrade to version 8.2.3 or later","format":"markdown","source":"ghsa"}],"published":"2020-09-02T15:41:41.000Z","modified":"2021-09-27T13:34:07.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.2.3"}],"ecosystem":"npm","package":"mermaid","purl":"pkg:npm/mermaid","source":"ghsa"}],"references":[{"url":"https://github.com/knsv/mermaid/issues/847","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/knsv/mermaid","tags":["package"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/751","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w32g-5hqp-gg6q","url":"https://github.com/advisories/GHSA-w32g-5hqp-gg6q","licence":"CC-BY-4.0","modified":"2021-09-27T13:34:07.000Z"}],"updatedAt":"2026-11-25T22:56:46.754Z"}