5.3medium
Mermaid XY Charts are vulnerable to an infinite loop DoS
- Severity
- 5.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.58% (higher than 42% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-2v8p-3f2j-5mp7
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| mermaid-js mermaid | >= 10.6.0, < 10.9.8, >= 11.0.0-alpha.1, < 11.16.1 | CVE List |
| mermaid (npm) | from 10.6.0 before 10.9.8, from 11.0.0-alpha.1 before 11.16.1 | GitHub Advisory Database |
All scores
| GitHub_M | 5.3medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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
NVD (es)
Mermaid es una herramienta de JavaScript que utiliza texto inspirado en Markdown para crear y modificar diagramas y gráficos. Desde la versión 10.6.0 hasta la 10.9.8 y la 11.16.1, los gráficos XY de Mermaid son vulnerables a una denegación de servicio por bucle infinito en la función setXAxisRangeData al configurar un eje X con parámetros no válidos. Debido a que cada iteración del bucle añade un elemento a un array, esto generalmente provoca que aparezca un RangeError después de unos segundos, pero en su lugar puede causar que la página o el proceso de JavaScript se bloquee por agotamiento de memoria, dependiendo del entorno. Este problema está solucionado en las versiones 10.9.8 y 11.16.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-71436 changed 2026-08-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2v8p-3f2j-5mp7 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-71436 changed 2026-10-24 | Public domain |