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
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted architecture-beta diagram with __proto__ group id
  2. Delivery
    Mermaid parser accepts __proto__ as valid parent without sanitization
  3. Exploit
    Layout direction property written onto Object.prototype
  4. Execution
    Downstream application code reads poisoned property from arbitrary object
  5. Impact
    Logic corruption or denial of service in embedding application

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires two concrete conditions: first, the application must accept untrusted Mermaid diagram source text and pass it to the Mermaid renderer without stripping or validating diagram type; second, the diagram must use the 'architecture-beta' diagram type (diagrams using other Mermaid types such as flowchart, sequence, or gantt are not affected by this vulnerability). No authentication is required on the attacker's side if the host application allows anonymous diagram submission. Exploitation effect is further limited by the constrained injectable value - only the strings 'horizontal' or 'vertical' can be written to Object.prototype, meaning the realistic harm is logic corruption in code that reads a property of that name from an arbitrary object, or for...in loop contamination - not code execution. Applications running Mermaid in an isolated Web Worker or sandbox with a separate JavaScript realm are not affected even if they use architecture-beta diagrams, because the polluted prototype does not cross realm boundaries.

Impact

No CVSS score or EPSS probability was provided for this CVE, so quantitative risk ranking is not possible. KEV status is negative - no confirmed active exploitation by CISA. A working proof-of-concept is publicly available in the GitHub security advisory (GHSA-3rrr-jr9j-h3q3), which meaningfully lowers the bar for exploitation. The real-world impact is bounded by two factors: (1) the injected value is always a plain string ('horizontal' or 'vertical'), not a function or object, so arbitrary code execution via prototype pollution is not possible with this specific gadget; (2) actual harm depends entirely on whether any code in the hosting application's JavaScript realm reads the polluted property name from an arbitrary object or uses bare for...in enumeration. Applications that embed Mermaid for user-submitted diagrams (wikis, documentation platforms, SaaS tools) and have business logic that reads dynamic object properties are meaningfully at risk of logic corruption or DoS. Applications where diagrams are authored only by trusted parties face no practical risk. The 'RCE' tag in the source intelligence is misleading - the advisory explicitly states RCE is not directly achievable; that tag should be disregarded for decision-making.

Exploit ScenarioDerived

An attacker submits a crafted Mermaid diagram beginning with 'architecture-beta' to a documentation platform or wiki that renders user-supplied diagrams, using '__proto__' as a service's group parent identifier. When the platform renders the diagram server-side or in a shared browser context, Object.prototype is silently polluted with a string property. Subsequent requests processed in the same Node.js worker or browser tab may experience corrupted configuration defaults or logic branches that read the property, potentially causing application errors or denial of service for other users sharing that realm. A working PoC is publicly documented in GHSA-3rrr-jr9j-h3q3.

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

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.

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.

Affected VersionsENISA

mermaid 11.5.0, < 11.16.1

Affected Packages

npm mermaid fix: 11.16.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when Prototype Pollution gets its next vulnerability

  • 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 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
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

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
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

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

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

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Medium
popular open-source JS diagramming library, widely embedded in docs tools
Threat Intel
1
1 source
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 No
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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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

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-2021-23450 CRITICAL POC
9.8 Dec 17

All versions of package dojo are vulnerable to Prototype Pollution via the setObject function. Rated critical severity (

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-2021-23383 CRITICAL POC
9.8 May 04

The package handlebars before 4.7.7 are vulnerable to Prototype Pollution when selecting certain compiling options to co

CVE-2020-7788 CRITICAL POC
9.8 Dec 11

This affects the package ini before 1.3.6. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitabl

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

Vendor StatusVendor

SUSE

Severity: Moderate

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