GHSA-w32g-5hqp-gg6q
HIGHCross-Site Scripting in mermaid
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.
Recommendation
Upgrade to version 8.2.3 or later
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | mermaid | < 8.2.3 | 8.2.3 |
References
- https://github.com/knsv/mermaid/issues/847 · WEB
- https://github.com/knsv/mermaid · PACKAGE
- https://www.npmjs.com/advisories/751 · WEB
History
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 2 Sep 2020)