npmWorst: High16 advisories
mermaid: known vulnerabilities
mermaid has 16 reviewed security advisories in the GitHub Advisory Database — 3 high, 12 moderate, 1 low. The most recent was published 2026-08-06. Each one below lists the affected version range, the release that fixes it, its CVE and severity. SkyShield matches these against the mermaid versions running across your servers, containers and images, and ranks what to patch first.
How to fix mermaid
Upgrade mermaid to a release at or above the fixed version shown for each advisory below. For npm:
npm install mermaid@11.16.1 (or run npm audit fix)
SkyShield checks the installed version on every machine and container, so you can see which hosts are still on an affected release after you roll the fix out.
Advisories (16)
Mermaid XY Charts are vulnerable to an infinite loop DoS
Moderate CWE-1325 CWE-835
— Affected: from 11.0.0-alpha.1 up to 11.16.1. Fixed in 11.16.1. Published 2026-08-06. GHSA-2v8p-3f2j-5mp7 · CVE-2026-71436
Mermaid Architecture diagrams are vulnerable to prototype pollution
Moderate CWE-1321
— Affected: from 11.5.0 up to 11.16.1. Fixed in 11.16.1. Published 2026-08-06. GHSA-3rrr-jr9j-h3q3 · CVE-2026-71437
Mermaid allows CSS injection applying to sibling elements of the diagram
Moderate CWE-94
— Affected: before 10.9.8. Fixed in 10.9.8. Published 2026-08-06. GHSA-6x64-9x62-f2gx · CVE-2026-50159
Mermaid configuration APIs allow prototype pollution
Low CWE-1321
— Affected: before 10.9.8. Fixed in 10.9.8. Published 2026-08-06. GHSA-c4c3-pg64-4m4v · CVE-2026-71438
Mermaid radar diagrams are vulnerable to DoS
Moderate CWE-1322 CWE-606
— Affected: from 11.6.0 up to 11.16.1. Fixed in 11.16.1. Published 2026-08-06. GHSA-rhh3-jpg6-66xh · CVE-2026-71439
Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS
Moderate 5.3 CWE-835
— Affected: before 10.9.6. Fixed in 10.9.6. Published 2026-05-29. GHSA-6m6c-36f7-fhxh · CVE-2026-41150
Mermaid: Improper sanitization of configuration leads to CSS injection
Moderate CWE-94
— Affected: before 10.9.6. Fixed in 10.9.6. Published 2026-05-29. GHSA-87f9-hvmw-gh4p · CVE-2026-41159
Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection
Moderate CWE-94
— Affected: before 10.9.6. Fixed in 10.9.6. Published 2026-05-22. GHSA-ghcm-xqfw-q4vr · CVE-2026-41149
Mermaid: Improper sanitization of `classDefs` in diagrams leads to CSS injection
Moderate CWE-94
— Affected: before 10.9.6. Fixed in 10.9.6. Published 2026-05-22. GHSA-xcj9-5m2h-648r · CVE-2026-41148
Mermaid improperly sanitizes sequence diagram labels leading to XSS
Moderate CWE-79
— Affected: from 10.9.0-rc.1 up to 10.9.4. Fixed in 10.9.4. Published 2025-08-19. GHSA-7rqq-prvp-x9jh · CVE-2025-54881
Mermaid does not properly sanitize architecture diagram iconText leading to XSS
Moderate CWE-79
— Affected: from 11.1.0 up to 11.10.0. Fixed in 11.10.0. Published 2025-08-19. GHSA-8gwm-58g9-j8pw · CVE-2025-54880
Prototype pollution vulnerability found in Mermaid's bundled version of DOMPurify
High 7.0 CWE-1321 CWE-1395
— Affected: before 10.9.3. Fixed in 10.9.3. Published 2024-10-22. GHSA-m4gq-x24j-jpmf
Possible inject arbitrary `CSS` into the generated graph affecting the container HTML
Moderate 4.1 CWE-74 CWE-79
— Affected: from 8.0.0 up to 9.1.2. Fixed in 9.1.2. Published 2022-06-28. GHSA-x3vm-38hw-55wf · CVE-2022-31108
Incorrect sanitisation function leads to `XSS` in mermaid
High 7.2 CWE-20 CWE-79
— Affected: before 8.13.8. Fixed in 8.13.8. Published 2021-12-30. GHSA-p3rp-vmj9-gv6v · CVE-2021-43861
Cross-site Scripting in Mermaid
Moderate 6.1 CWE-79
— Affected: before 8.11.0. Fixed in 8.11.0. Published 2021-06-27. GHSA-4f6x-49g2-99fm · CVE-2021-35513
Cross-Site Scripting in mermaid
High CWE-79
— Affected: before 8.2.3. Fixed in 8.2.3. Published 2020-09-02. GHSA-w32g-5hqp-gg6q
Find mermaid across your fleet
Install one agent per server and connect your cloud. SkyShield matches your packages and images against GHSA,
CISA KEV and EPSS and shows the fix per machine. Free for one server, then from $49 per server a month.
Start free.