Skip to content
Fencer Vulns
high 7.2

CVE-2021-43861 json

Incorrect sanitisation function leads to `XSS`

published 2021-12-30 4 y ago modified 2026-07-08 4 mo ago also GHSA-p3rp-vmj9-gv6v , EUVD-2022-0654

cvss
7.2
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.9%
EPSS 0.9% chance of exploitation in 30 days, percentile 61%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm mermaid 8.13.8
  • mermaid_project mermaid 8.13.8
  • node-mermaid Debian 14 8.13.8+~cs10.4.16-1

debian advisories DEBIAN-CVE-2021-43861

Exploit prediction

0.94% chance of exploitation in the next 30 days, higher than 61% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.2 CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 5.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
NVD 2.0 3.5 AV:N/AC:M/Au:S/C:N/I:P/A:N
GitHub 3.1 7.2 CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
npm mermaid
<8.13.8
8.13.8

Affected products

  • mermaid-js mermaid

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation
  • CWE-20 Improper Input Validation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.