CVE-2026-71436

Mermaid XY Charts are vulnerable to an infinite loop DoS

Published Aug 6, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Mermaid Project
Mermaid Project mermaid
Vendors & Products Mermaid Project
Mermaid Project mermaid
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'}

Weaknesses
  • CWE-1325

    Improperly Controlled Sequential Memory Allocation

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 7, 2026, 4:17 PM
Reserved
Aug 6, 2026, 4:28 PM
Status
Awaiting Analysis
Published
Aug 6, 2026, 10:18 PM
Modified
Oct 24, 2026, 3:10 PM
Severity
Important
Public date
Aug 6, 2026, 7:49 PM