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.

Severity (CVSS 3.1)7.2High
Exploit odds (30 days)0.9%top 39.0% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:14node-mermaid8.13.8+~cs10.4.16-1DEBIAN-CVE-2021-43861
Ubuntu:22.04:LTSnode-mermaidno fix listedUBUNTU-CVE-2021-43861
Ubuntu:26.10node-mermaidno fix listedUBUNTU-CVE-2021-43861
npmmermaid8.13.8GHSA-p3rp-vmj9-gv6v

Affected products (as reported)

VendorProductVersions
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

References