Description
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. From version 10.6.0 until 10.9.8 and 11.16.1, Mermaid XY Charts are vulnerable to an infinite loop denial of service in the setXAxisRangeData function when configuring an X-Axis with invalid parameters. Because each loop iteration appends an element to an array, this generally causes a RangeError to appear after a few seconds, but it may instead cause the page or JavaScript process to crash from memory exhaustion, depending on the environment. This issue is fixed in versions 10.9.8 and 11.16.1.
Published: 2026-08-06
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mermaid is a JavaScript graphing library that parses markdown‑like text to create diagrams. The flaw resides in the setXAxisRangeData function used by XY Charts. When the function receives an invalid X‑Axis configuration, it enters an infinite loop that repeatedly appends elements to an array. After only a few iterations this can trigger a RangeError or exhaust available memory, leading the page or the JavaScript process to crash. The result is a denial of service that affects any environment that renders Mermaid diagrams with such X‑Axis parameters.

Affected Systems

The vulnerability impacts Mermaid versions 10.6.0 through 10.9.8 as well as 11.16.1. Any application, website, or tool that embeds Mermaid to render XY Charts using these versions is exposed. Updating to version 10.9.8 or later (including 11.16.1) eliminates the issue.

Risk and Exploitability

The CVSS score of 5.3 denotes medium severity, and the EPSS score is not available, so current exploitation probability cannot be quantified. The flaw is not listed in the CISA KEV catalog. An attacker must supply or force Mermaid to parse a diagram that specifies an invalid X‑Axis range. In such a scenario the infinite loop and subsequent memory exhaustion can be triggered, causing the rendering page or node process to terminate, which provides a straightforward denial‑of‑service vector.

Generated by OpenCVE AI on August 7, 2026 at 01:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mermaid to at least version 10.9.8 or the newer 11.16.1 release.
  • If an immediate upgrade is not possible, disable or remove XY Chart functionality for inputs that allow custom X‑Axis ranges.
  • Sanitize user‑supplied diagram definitions to ensure X‑Axis values conform to acceptable bounds and reject any values that could trigger the loop.
  • Consider rendering Mermaid diagrams in an isolated or sandboxed environment to contain crashes.

Generated by OpenCVE AI on August 7, 2026 at 01:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-2v8p-3f2j-5mp7 Mermaid XY Charts are vulnerable to an infinite loop DoS
History

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. From version 10.6.0 until 10.9.8 and 11.16.1, Mermaid XY Charts are vulnerable to an infinite loop denial of service in the setXAxisRangeData function when configuring an X-Axis with invalid parameters. Because each loop iteration appends an element to an array, this generally causes a RangeError to appear after a few seconds, but it may instead cause the page or JavaScript process to crash from memory exhaustion, depending on the environment. This issue is fixed in versions 10.9.8 and 11.16.1.
Title Mermaid XY Charts are vulnerable to an infinite loop DoS
Weaknesses CWE-1325
CWE-835
References
Metrics cvssV4_0

{'score': 5.3, 'vector': '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-06T19:49:44.739Z

Reserved: 2026-08-06T16:28:51.183Z

Link: CVE-2026-71436

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T01:30:04Z

Weaknesses
  • CWE-1325

    Improperly Controlled Sequential Memory Allocation

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')