CVE-2026-41150: Mermaid Denial of Service Vulnerability
MODERATECVE-2026-41150 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Mermaid libraries in the npm ecosystem. The issue involves mermaid gantt charts are vulnerable to an infinite loop dos. Remediation is available by upgrading affected packages to version 11.15.0, 10.9.6.
CVE-2026-41150 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-41150
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.15.0
npm install mermaid@10.9.6
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-41150, 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.15.0), 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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. 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-41150 Affected Mermaid Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mermaid
|
npm |
≥ 11.0.0-alpha.1
< 11.15.0
|
11.15.0
|
|
mermaid
|
npm |
< 10.9.6
|
10.9.6
|
References
Frequently Asked Questions
What is CVE-2026-41150?
Which Mermaid versions are affected?
What version fixes CVE-2026-41150?
Is mermaid affected?
What is the CVSS score of CVE-2026-41150?
What CWE is associated with CVE-2026-41150?
How can I check npm dependencies for CVE-2026-41150?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6m6c-36f7-fhxh",
"modified" : "2026-06-09T10:28:48Z",
"published" : "2026-05-11T19:36:55Z",
"aliases" : [ "CVE-2026-41150" ],
"summary" : "Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS",
"details" : "### Impact\n\nMermaid v11.14.0 and earlier are vulnerable to a denial-of-service attack when rendering gantt charts, if they use the [`excludes` attribute](https://mermaid.js.org/syntax/gantt.html?#excludes) to exclude all dates.\n\nExample:\n\n```\ngantt\n excludes monday,tuesday,wednesday,thursday,friday,saturday,sunday\n DoS :2025-01-01, 1d\n```\n\n`mermaid.parse` is unaffected, unless you then call the `ganttDb.getTasks()` (which is called when rendering a diagram).\n\n### Patches\n\nThis has been patched in:\n\n- [v11.15.0](https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.15.0) (see [faafb5d49106dd32c367f3882505f2dd625aa30e](https://github.com/mermaid-js/mermaid/commit/faafb5d49106dd32c367f3882505f2dd625aa30e))\n- [v10.9.6](https://github.com/mermaid-js/mermaid/releases/tag/v10.9.6) (see [a59ea56174712ee5430dfd5bc877cb5151f501a6](https://github.com/mermaid-js/mermaid/commit/a59ea56174712ee5430dfd5bc877cb5151f501a6))\n\n### Workarounds\n\nThere are no workarounds available without updating to a newer version of mermaid.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
}, {
"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.0.0-alpha.1"
}, {
"fixed" : "11.15.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 11.14.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mermaid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "10.9.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 10.9.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-6m6c-36f7-fhxh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41150"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/commit/a59ea56174712ee5430dfd5bc877cb5151f501a6"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/commit/faafb5d49106dd32c367f3882505f2dd625aa30e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mermaid-js/mermaid"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.15.0"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/releases/tag/v10.9.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-11T19:36:55Z",
"nvd_published_at" : "2026-05-29T15:16:22Z"
}
}