Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft xychart diagram with x-axis 1 --> 1
-
DeliverySubmit to Mermaid rendering endpoint
-
ExploitTrigger infinite loop in setXAxisRangeData()
-
ExecutionArray grows unbounded consuming heap memory
-
ImpactJavaScript process or browser tab crashes
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerability is triggered exclusively when rendering a Mermaid XY chart diagram type ( |
| Impact | No CVSS vector was provided by NVD or the vendor advisory, so severity must be inferred. The attack requires only a crafted diagram string - no credentials, no network adjacency beyond what the application exposes, and no prior foothold. For applications that expose Mermaid rendering to untrusted users (documentation platforms, wikis, chat tools, SaaS editors), exploitation is fully automatable: one malformed diagram causes a process or tab crash within seconds. The impact is purely availability; no confidentiality or integrity compromise is possible. The public POC lowers the exploitation bar to zero skill required. EPSS data is unavailable at time of analysis. The absence of a CISA KEV listing suggests no confirmed widespread active exploitation, but the trivial POC and broad deployment of Mermaid in developer-facing tools represents genuine real-world risk for affected application categories. Risk is context-dependent: applications that do not accept untrusted diagram input are not affected at the library level. |
| Exploit ScenarioDerived | An attacker submits the three-line Mermaid diagram |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 06, 2026
Infinite-loop denial of service in Mermaid's XY chart renderer allows any party that can supply diagram input to crash the JavaScript process or browser tab. The setXAxisRangeData() function in npm/mermaid enters an unbounded loop when an x-axis range is defined with identical start and end values, growing an array until memory is exhausted or a RangeError: Invalid array length is thrown. A proof-of-concept is publicly embedded in the GitHub security advisory (GHSA-2v8p-3f2j-5mp7), making exploitation trivial; no CISA KEV listing has been issued.
RemediationAI
Upgrade to Mermaid v11.16.1 (for v11 users) or v10.9.8 (for v10 users). Release artifacts and changelogs are available at https://github.com/mermaid-js/mermaid/releases/tag/mermaid@11.16.1 and https://github.com/mermaid-js/mermaid/releases/tag/v10.9.8 respectively; the underlying fix commits are 630aa7e5dd417e1f56bff2a1ce8df2c5ad08d289 (v11) and ef60adc837d9d5107af21285f01e83dea309bd0a (v10). The vendor advisory explicitly states no known workarounds exist. As a temporary compensating control for applications unable to patch immediately, implement server-side or application-layer validation that rejects XY chart definitions where the x-axis range start and end values are equal before passing input to the renderer - note that this requires custom parsing logic and is not a reliable substitute for patching. Alternatively, disable or sandbox xychart diagram rendering entirely if it is not required.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Mermaid is a widely used JavaScript diagramming library (pkg:npm/mermaid) that parses text-based diagram syntax and renders SVG output in browsers or Node.js environments. The XY chart module (xychart/xychart-beta diagram type) includes a function setXAxisRangeData() responsible for computing axis tick data from a user-supplied range. CWE-835 (Loop with Unreachable Exit Condition) is the root cause: when the x-axis start and end values are equal (a zero-width range such as x-axis 1 --> 1), the loop's termination condition is never satisfied, causing it to iterate indefinitely while appending elements to an internal array. The fix in commit 630aa7e5 adds explicit handling for zero-width ranges, confirmed by changeset entry 'fix(xychart): support zero-width x-axis ranges'. Affected packages are pkg:npm/mermaid in both the v10 and v11 release lines.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-delivered diagram input with no auth requirement at library level; purely availability impact, no scope change.
Primary rating from Vendor (https://github.com/mermaid-js/mermaid).
CVSS VectorVendor: https://github.com/mermaid-js/mermaid
Lifecycle Timeline
1DescriptionCVE.org
Impact
Mermaid XY Charts are vulnerable to an infinite loop DoS attack in the setXAxisRangeData(), when configuring an X-Axis with invalid parameters.
As each loop appends an element to an array, this would generally only cause an RangeError: Invalid array length to appear after a few seconds, but may cause the page/JavaScript process to crash due to memory exhaustion, depending on the environment.
Proof-of-concept
xychart
x-axis 1 --> 1
line [1, 2]Patches
This has been patched in https://github.com/mermaid-js/mermaid/commit/630aa7e5dd417e1f56bff2a1ce8df2c5ad08d289 and released in Mermaid v11.16.1.
A backport has been made for the v10 branch in ef60adc837d9d5107af21285f01e83dea309bd0a and was released in Mermaid v10.9.8
Workarounds
There are no known workarounds. Please update to the latest version or apply the patch.
References
- https://github.com/mermaid-js/mermaid/commit/630aa7e5dd417e1f56bff2a1ce8df2c5ad08d289
- https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1
- https://github.com/mermaid-js/mermaid/commit/ef60adc837d9d5107af21285f01e83dea309bd0a
- https://github.com/mermaid-js/mermaid/releases/tag/v10.9.8
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-54241
GHSA-2v8p-3f2j-5mp7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB