Mermaid v11.14.0 and earlier are vulnerable to a denial-of-service attack when rendering gantt charts, if they use the excludes attribute to exclude all dates.
Example:
gantt
excludes monday,tuesday,wednesday,thursday,friday,saturday,sunday
DoS :2025-01-01, 1d
mermaid.parse is unaffected, unless you then call the ganttDb.getTasks() (which is called when rendering a diagram).
This has been patched in:
There are no workarounds available without updating to a newer version of mermaid.
{
"github_reviewed": true,
"github_reviewed_at": "2026-05-11T19:36:55Z",
"cwe_ids": [
"CWE-835"
],
"severity": "MODERATE",
"nvd_published_at": null
}