CVE-2021-43861

Incorrect sanitisation function leads to `XSS`

MEDIUM
5.4
CVSS Score
Published: December 30, 2021 at 01:40 PM UTC
Updated: June 17, 2026 at 04:11 AM UTC
2 products affected across 2 vendorsMermaidMermaid

Using mermaid by mermaid-js?

Get instant alerts when new vulnerabilities affect mermaid - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.4
Exploit prediction
EPSS 0.9%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 8.13.8
Affected range stops below 8.13.8, so it looks safe — our inference, not a vendor statement
v < 8.13.8
Affected range stops below 8.13.8, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-20CWE-79NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card