Vulnerabilities in pkg:npm/mermaid
PACKAGECVE-2026-71439 is a MODERATE denial of service vulnerability (CWE-606: Unchecked Input for Loop Condition) affecting Mermaid libraries in the npm ecosystem. The issue involves mermaid radar diagrams are vulnerable to dos. Remediation is available by upgrading affected packages to version 11.16.1.
pkg:npm/mermaid
Vulnerability advisories affecting package pkg:npm/mermaid. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-rhh3-jpg6-66xh | CVE-2026-71439 | MODERATE | Mermaid radar diagrams are vulnerable to DoS |
| GHSA-c4c3-pg64-4m4v | CVE-2026-71438 | LOW | Mermaid configuration APIs allow prototype pollution |
| GHSA-6x64-9x62-f2gx | CVE-2026-50159 | MODERATE | Mermaid allows CSS injection applying to sibling elements of the diagram |
| GHSA-3rrr-jr9j-h3q3 | CVE-2026-71437 | MODERATE | Mermaid Architecture diagrams are vulnerable to prototype pollution |
| GHSA-2v8p-3f2j-5mp7 | CVE-2026-71436 | MODERATE | Mermaid XY Charts are vulnerable to an infinite loop DoS |
| GHSA-87f9-hvmw-gh4p | CVE-2026-41159 | MODERATE | Mermaid: Improper sanitization of configuration leads to CSS injection |
| GHSA-6m6c-36f7-fhxh | CVE-2026-41150 | MODERATE | Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS |
| GHSA-ghcm-xqfw-q4vr | CVE-2026-41149 | MODERATE | Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection |
| GHSA-xcj9-5m2h-648r | CVE-2026-41148 | MODERATE | Mermaid: Improper sanitization of `classDefs` in diagrams leads to CSS injection |
| GHSA-7rqq-prvp-x9jh | CVE-2025-54881 | MODERATE | Mermaid improperly sanitizes sequence diagram labels leading to XSS |
| GHSA-8gwm-58g9-j8pw | CVE-2025-54880 | MODERATE | Mermaid does not properly sanitize architecture diagram iconText leading to XSS |
| GHSA-m4gq-x24j-jpmf | - | HIGH | Prototype pollution vulnerability found in Mermaid's bundled version of DOMPurify |
| GHSA-x3vm-38hw-55wf | CVE-2022-31108 | MODERATE | Possible inject arbitrary `CSS` into the generated graph affecting the container HTML |
| GHSA-p3rp-vmj9-gv6v | CVE-2021-43861 | HIGH | Incorrect sanitisation function leads to `XSS` in mermaid |
| GHSA-w32g-5hqp-gg6q | - | HIGH | Cross-Site Scripting in mermaid |
| GHSA-4f6x-49g2-99fm | CVE-2021-35513 | MODERATE | Cross-site Scripting in Mermaid |
CVE-2026-71439 at a Glance
How to Fix CVE-2026-71439
To remediate this vulnerability, upgrade all affected Mermaid dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mermaid@11.16.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mermaid
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-71439, inspect your project dependencies using npm:
npm ls mermaid
Analyze the terminal output to locate any version of Mermaid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.16.1), your application is affected.
Note: The npm ls mermaid command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-606: Unchecked Input for Loop Condition, where the product does not properly check inputs that are used for loop conditions, potentially leading to a denial of service or other consequences because of excessive looping. In Mermaid, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-71439 Affected Mermaid Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mermaid
|
npm |
≥ 11.6.0
< 11.16.1
|
11.16.1
|
References
Frequently Asked Questions
What is CVE-2026-71439?
Which Mermaid versions are affected?
What version fixes CVE-2026-71439?
Is mermaid affected?
What CWE is associated with CVE-2026-71439?
How can I check npm dependencies for CVE-2026-71439?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rhh3-jpg6-66xh",
"modified" : "2026-08-06T20:01:07Z",
"published" : "2026-08-06T20:01:07Z",
"aliases" : [ "CVE-2026-71439" ],
"summary" : "Mermaid radar diagrams are vulnerable to DoS",
"details" : "### Impact\n\nMermaid radar diagrams allow arbitrary large values for `ticks`, which can cause high CPU usage, freezing the webpage/JavaScript process for long periods of time, until the process is eventually killed due to OOM/running out of memory.\n\n#### Proof-of-concept\n\n```txt\nradar-beta\n axis a, b\n curve c {1, 1}\n ticks 1000000000\n```\n\n### Patches\n\n_Has the problem been patched? What versions should users upgrade to?_\n\nThis problem has been patched by https://github.com/mermaid-js/mermaid/commit/59b22fad2b3bb04f87a476c84a8a2b24679e607e, which was released in [Mermaid v11.16.1](https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1)\n\n### Workarounds\n\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nThere are no known workarounds without updating to a patched version of mermaid.\n\n### References\n\n_Are there any links users can visit to find out more?_\n\n- https://github.com/mermaid-js/mermaid/commit/59b22fad2b3bb04f87a476c84a8a2b24679e607e\n- https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mermaid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.6.0"
}, {
"fixed" : "11.16.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-rhh3-jpg6-66xh"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/pull/8022"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/commit/59b22fad2b3bb04f87a476c84a8a2b24679e607e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mermaid-js/mermaid"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1322", "CWE-606" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-06T20:01:07Z",
"nvd_published_at" : null
}
}