Skip to main content

Mermaid EUVDEUVD-2026-54242

| CVE-2026-71437 MEDIUM
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-08-06 https://github.com/mermaid-js/mermaid GHSA-3rrr-jr9j-h3q3
6.5
CVSS 4.0 · Vendor: https://github.com/mermaid-js/mermaid
Share

Severity by source

Vendor (https://github.com/mermaid-js/mermaid) PRIMARY
6.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
7.2 HIGH

Network-reachable via untrusted diagram input, no auth or interaction needed for automated rendering, scope changed because pollution crosses into the embedding application's realm.

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

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

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
X

Lifecycle Timeline

3
CVSS changed
Aug 06, 2026 - 22:22 NVD
6.5 (MEDIUM)
Source Code Evidence Fetched
Aug 06, 2026 - 20:36 vuln.today
Analysis Generated
Aug 06, 2026 - 20:36 vuln.today

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on mermaid (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 11.5.0.

DescriptionCVE.org

Rendering an untrusted architecture-beta diagram lets the diagram author write an arbitrary property with the value horizontal or vertical onto Object.prototype. A group id of __proto__ is accepted as a valid parent.

Impact

Any code in the same realm that reads a property of that name from an arbitrary object, or enumerates an object with bare for...in, observes the injected value (which can only be the string horizontal or vertical.

This may mean corrupted option/config defaults, bypassed truthiness checks, causing denial of service or logic corruption in the embedding application.

Because the injected value cannot be an object or function, this is not directly exploitable for remote code execution.

PoC

architecture-beta
      group mermaidPrototypePollutionMarker(cloud)[Marker]
      service a(server)[A] in __proto__
      service b(server)[B] in mermaidPrototypePollutionMarker
      a:R -- L:b

The vulnerable write was introduced in commit cb0a4703bdf01d47508bde1c08aa9a980d70bc20 and first shipped in mermaid@11.5.0. The lines are unchanged in every release since.

Patches

This has been patched by https://github.com/mermaid-js/mermaid/commit/99af3fc35ef0a9a9c8c6314521344d67523ddccf, released in Mermaid v11.16.1

Workarounds

There are no known workarounds. Please update to a patched version.

References

_Are there any links users can visit to find out more?_

  • https://github.com/mermaid-js/mermaid/commit/99af3fc35ef0a9a9c8c6314521344d67523ddccf
  • https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1

AnalysisAI

Prototype pollution in Mermaid's architecture-beta diagram renderer (mermaid@11.5.0 through 11.16.0) allows an untrusted diagram author to write the string 'horizontal' or 'vertical' directly onto Object.prototype by supplying '__proto__' as a valid group parent identifier. All JavaScript code sharing the same runtime realm that reads or enumerates the injected property name may observe corrupted option defaults, bypassed truthiness checks, or denial-of-service conditions in the embedding application. A public proof-of-concept is included in the advisory; direct remote code execution is not achievable because the injectable value is constrained to those two strings, ruling out function or object injection.

Technical ContextAI

CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes - Prototype Pollution) describes the root cause precisely: the architecture-beta diagram parser stores group parent relationships in a plain JavaScript object without sanitizing reserved keys. When a service declares 'in __proto__', the parser traverses the prototype chain and writes the layout direction property ('horizontal' or 'vertical') onto Object.prototype itself rather than a diagram-owned object. Because JavaScript's prototype chain is shared across all objects in a realm, every subsequent property lookup on an arbitrary object in the same realm may observe the injected value. The affected npm package is pkg:npm/mermaid versions >= 11.5.0 (introduced in commit cb0a4703bdf01d47508bde1c08aa9a980d70bc20) through < 11.16.1. The fix (commit 99af3fc35ef0a9a9c8c6314521344d67523ddccf, PR #8022) migrates group and service storage from plain objects to ES6 Map and Set structures, which are immune to __proto__ prototype traversal.

RemediationAI

Upgrade to mermaid@11.16.1 or later, which resolves this issue by replacing prototype-vulnerable plain-object group storage with ES6 Map and Set structures (commit 99af3fc35ef0a9a9c8c6314521344d67523ddcommit, PR https://github.com/mermaid-js/mermaid/pull/8022; release notes at https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1). The upstream advisory explicitly states there are no known workarounds short of patching. If an immediate upgrade is not possible, a compensating control is to disable or block rendering of architecture-beta diagram type at the application layer - reject or strip diagram content that begins with the 'architecture-beta' keyword before it reaches the Mermaid renderer. This eliminates exposure to this specific vector but may break legitimate architecture diagram functionality. Blanket disabling of user-submitted diagram rendering is an alternative with a higher operational cost.

CVE-2026-34621 HIGH POC
8.6 Apr 11

Prototype pollution in Adobe Acrobat Reader versions 24.001.30356, 26.001.21367 and earlier enables arbitrary code execu

CVE-2024-56059 CRITICAL
9.8 Dec 18

Prototype pollution in the farinspace Partners WordPress plugin (versions up to and including 0.2.0) enables remote unau

CVE-2020-28271 CRITICAL POC
9.8 Nov 12

Prototype pollution vulnerability in 'deephas' versions 1.0.0 through 1.0.5 allows attacker to cause a denial of service

CVE-2023-38894 CRITICAL POC
9.8 Aug 16

A Prototype Pollution issue in Cronvel Tree-kit v.0.7.4 and before allows a remote attacker to execute arbitrary code vi

CVE-2024-24292 CRITICAL POC
9.8 Mar 28

A Prototype Pollution issue in Aliconnect /sdk v.0.0.6 allows an attacker to execute arbitrary code via the aim function

CVE-2023-26121 CRITICAL POC
10.0 Apr 11

All versions of the package safe-eval are vulnerable to Prototype Pollution via the safeEval function, due to improper s

CVE-2021-23449 CRITICAL POC
10.0 Oct 18

This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr

CVE-2024-39011 CRITICAL POC
9.8 Jul 30

Prototype Pollution in chargeover redoc v2.0.9-rc.69 allows attackers to execute arbitrary code or cause a Denial of Ser

CVE-2024-38988 CRITICAL POC
9.8 Mar 28

alizeait unflatto <= 1.0.2 was discovered to contain a prototype pollution via the method exports.unflatto at /dist/inde

CVE-2025-57347 CRITICAL POC
9.8 Sep 24

A vulnerability exists in the 'dagre-d3-es' Node.js package version 7.0.9, specifically within the 'bk' module's addConf

CVE-2025-57321 CRITICAL POC
9.8 Sep 24

A Prototype Pollution vulnerability in the util-deps.addFileDepend function of magix-combine-ex versions thru 1.2.10 all

CVE-2024-45435 CRITICAL POC
9.8 Aug 29

Chartist 1.x through 1.3.0 allows Prototype Pollution via the extend function. Rated critical severity (CVSS 9.8), this

Vendor StatusVendor

SUSE

Severity: Moderate

Share

EUVD-2026-54242 vulnerability details – vuln.today

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