Skip to main content

Mermaid CVE-2026-71436

| EUVDEUVD-2026-54241 MEDIUM
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-08-06 https://github.com/mermaid-js/mermaid GHSA-2v8p-3f2j-5mp7
5.3
CVSS 4.0 · Vendor: https://github.com/mermaid-js/mermaid
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft xychart diagram with x-axis 1 --> 1
  2. Delivery
    Submit to Mermaid rendering endpoint
  3. Exploit
    Trigger infinite loop in setXAxisRangeData()
  4. Execution
    Array grows unbounded consuming heap memory
  5. Impact
    JavaScript 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 (xychart or xychart-beta) with an x-axis range where the start and end values are identical (e.g., x-axis 1 --> 1). Exploitation requires that the attacker can supply diagram text that is processed by the Mermaid rendering engine - either through a browser-side rendering path or a server-side Node.js rendering pipeline. The library itself imposes no authentication; whether an attacker can reach the renderer depends on the consuming application's access controls. Exploitation is limited to availability impact only (DoS); no code execution, data exfiltration, or integrity violation is possible. All other diagram types (flowchart, sequence, etc.) are unaffected. Environments that do not process user-supplied XY chart input are not at risk.

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 xychart\n x-axis 1 --> 1\n line [1, 2] to any web application, documentation platform, or API that accepts and renders user-supplied Mermaid diagrams. The rendering engine immediately enters an infinite loop in setXAxisRangeData(), consuming all available JavaScript heap memory and crashing the browser tab or Node.js process within seconds. The exact POC is reproduced verbatim in the public advisory, requiring no exploitation skill.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

mermaid 10.6.0, < 10.9.8
mermaid 11.0.0-alpha.1, < 11.16.1

Affected Packages

npm mermaid fix: 10.9.8, 11.16.1
euvd mermaid_11_0_0_alpha_1 fix: 11.16.1

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

Vendor (https://github.com/mermaid-js/mermaid) PRIMARY 5.3 MEDIUM
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
vuln.today AI 7.5 HIGH

Network-delivered diagram input with no auth requirement at library level; purely availability impact, no scope change.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/mermaid-js/mermaid).

CVSS VectorVendor: https://github.com/mermaid-js/mermaid

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
Low

Lifecycle Timeline

1
CVSS changed
Aug 06, 2026 - 22:22 NVD
5.3 (MEDIUM)

DescriptionCVE.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
txt
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

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
popular JavaScript diagramming library, widely embedded in developer wikis and editors
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy