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
References
-
github.com
/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83
web, patch, third-party-advisory
-
github.com
/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v
web, third-party-advisory
-
github.com
/mermaid-js/mermaid/releases/tag/8.13.8
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-43861
advisory
-
github.com
/mermaid-js/mermaid
package
Sources
- CVE List CVE-2021-43861
- GitHub Advisory GHSA-p3rp-vmj9-gv6v
- NVD CVE-2021-43861
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.