Vulnerability · Published Dec 30, 2021 · Assigned by GitHub_M
CVE-2021-43861Incorrect sanitisation function leads to `XSS`
High 7.2
In plain English
A high-severity cross-site scripting in mermaid from mermaid-js. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 61% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. Prior to version 8.13.8, malicious diagrams can run javascript code at diagram readers' machines. Users should upgrade to version 8.13.8 to receive a patch. There are no known workarounds aside from upgrading.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:14 | node-mermaid | 8.13.8+~cs10.4.16-1 | DEBIAN-CVE-2021-43861 |
| Ubuntu:22.04:LTS | node-mermaid | no fix listed | UBUNTU-CVE-2021-43861 |
| Ubuntu:26.10 | node-mermaid | no fix listed | UBUNTU-CVE-2021-43861 |
| npm | mermaid | 8.13.8 | GHSA-p3rp-vmj9-gv6v |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| mermaid-js | mermaid | < 8.13.8 |
Weakness: CWE-79, CWE-20 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H