Skip to main content

Mermaid CVE-2026-71438

| EUVDEUVD-2026-54244 LOW
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-08-06 https://github.com/mermaid-js/mermaid GHSA-c4c3-pg64-4m4v
2.4
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
    Attacker submits crafted config payload
  2. Delivery
    Application forwards user input to mermaid.initialize
  3. Exploit
    assignWithDepth merges __proto__ key unsanitized
  4. Execution
    Object.prototype polluted in JavaScript runtime
  5. Impact
    Exploit modified prototype for logic bypass or information disclosure

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 that the host application passes attacker-controlled data directly into one of three Mermaid configuration functions: mermaid.initialize(), mermaidAPI.setConfig(), or mermaidAPI.updateSiteConfig(). This usage pattern is explicitly outside Mermaid's documented API contract, which treats these functions as receiving only trusted, developer-supplied values. User-controlled configuration paths (%%{init: {}}%% or YAML frontmatter in diagram code) are already protected and are not exploitable via this vulnerability. Exploitation is therefore limited to scenarios where a developer has written integration code that directly pipes user input into the configuration layer - a non-default, non-standard deployment pattern. Authentication requirements are not confirmed from available data, as no CVSS vector is provided; however, exploitability depends entirely on the host application's architecture and whether it exposes these config functions to external input.

Impact

No CVSS vector or EPSS score is available for this CVE, limiting quantitative risk scoring. The vendor explicitly rates practical risk as low: exploitation requires the host application to forward attacker-controlled data directly into a Mermaid configuration API, which is outside documented usage and contrary to the security model of these functions. Tags indicate potential Information Disclosure, consistent with prototype pollution enabling property injection that could leak or overwrite application state. There is no KEV listing and no reported public exploit code, and the advisory states Mermaid believes it unlikely anyone is impacted. The attack chain depends on a misconfigured or intentionally permissive host application, making this a conditional, deployment-dependent vulnerability. From an SSVC perspective, exploitation status is none at time of analysis; automation would depend on the specific host application architecture; and technical impact would be partial, limited to prototype property injection within the JavaScript runtime. The risk is primarily relevant to organizations running custom integrations that pipe user input into Mermaid's configuration layer, which represents a niche and non-standard deployment pattern.

Exploit ScenarioDerived

An attacker targets a web application that renders user-submitted Mermaid diagram configurations by passing them directly to mermaid.initialize() or mermaidAPI.setConfig(). The attacker submits a configuration payload containing a __proto__ key with a crafted value, which the assignWithDepth helper merges into Object.prototype, injecting a property visible to all objects in the JavaScript runtime. Depending on how the host application subsequently uses object property lookups, this could enable property overwriting, security control bypass, or information disclosure. No public proof-of-concept has been identified at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% 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 the Mermaid JavaScript diagramming library (npm/mermaid) exposes applications to JavaScript Object prototype manipulation when attacker-controlled data is incorrectly passed to configuration APIs. The assignWithDepth deep-merge helper used by mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig fails to sanitize __proto__ keys, allowing an attacker to corrupt the shared Object prototype if a host application forwards user-supplied input into these configuration entry points - a usage pattern explicitly outside Mermaid's documented API contract. No public exploit has been identified and no CISA KEV listing exists; vendor risk assessment is low due to the non-standard application integration pattern required for exploitation.

RemediationAI

Upgrade to Mermaid v11.16.1 (for v11 branch users) or v10.9.8 (for v10 branch users); both releases include the assignWithDepth prototype pollution hardening from commit 2cd6dcf735533b323507e3e889ffdea870540b43 (v11) and backport commit c34b07a0815842327e70794d69b0c8c5a1e2a956 (v10). If patching is not immediately possible, the primary workaround is to ensure that no user-controlled data is ever forwarded to mermaid.initialize, mermaidAPI.setConfig, or mermaidAPI.updateSiteConfig; use the already-protected %%{init: {}}%% directive or YAML frontmatter in diagram code for user-supplied configuration instead - these paths were already sanitized prior to this advisory. Note that mermaidAPI.setConfig() has been marked deprecated in v11.16.1, so callers should begin migration away from it regardless of the security concern. Patch and release details are available at https://github.com/mermaid-js/mermaid/pull/8022 and the release tags above.

Affected VersionsENISA

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

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/TypeScript library (npm package) for rendering diagrams from text-based syntax, commonly embedded in wikis, documentation platforms, and developer tools. The vulnerability (CWE-1321 - Improperly Controlled Modification of Object Prototype Attributes) resides in the assignWithDepth utility function, which performs recursive deep-merge of configuration objects. When a caller passes an object containing a __proto__ key or similar prototype-polluting payload, the merge operation propagates the value into Object.prototype, affecting all JavaScript objects in the same runtime. Affected packages are pkg:npm/mermaid versions >= 11.0.0-alpha.1 up to (excluding) 11.16.1, and all v10 releases prior to 10.9.8. Notably, the user-facing diagram configuration paths (%%{init: {}}%% and YAML frontmatter) were already hardened against this class of attack prior to this disclosure; only the three developer-facing API surfaces remained unprotected.

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 2.4 LOW
CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:N/VI:L/VA:L/SC:H/SI:H/SA:H
vuln.today AI 5.4 MEDIUM

AV:N and PR:N reflect attacker reaching a web-facing application; AC:H because exploitation requires the host app to non-standardly forward user input to config functions; S:C for prototype pollution affecting the shared JavaScript Object prototype.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

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

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

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
High
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
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
2.4 (LOW)

DescriptionCVE.org

Summary

Mermaid's configuration setters (mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig) merge the caller-supplied configuration object into Mermaid's internal config using the assignWithDepth deep-merge helper that is vulnerable to prototype pollution.

Because these APIs are intended to receive trusted configuration supplied by the application integrating Mermaid, Mermaid assesses the practical risk as low. The vulnerability is only reachable if an application forwards attacker-controlled data directly into one of these configuration entry points, which is outside their documented usage.

User-controlled configuration (e.g. configuration in diagram code using %%{init: {}}%% or YAML frontmatter) are already protected from prototype pollution.

Patches

This has been patched in https://github.com/mermaid-js/mermaid/commit/2cd6dcf735533b323507e3e889ffdea870540b43 and released in Mermaid v11.16.1.

A backport has been made for the v10 branch in c34b07a0815842327e70794d69b0c8c5a1e2a956 and was released in Mermaid v10.9.8

Impact

Mermaid believes it's unlikely that anybody is impacted, as these functions are configuration entry points expected to receive trusted, developer-controlled values as they can modify other security-relevant configuration.

Workarounds

Don't pass user-controlled data to the mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig functions. Instead, users can use %%{init: {}}%% or YAML frontmatter in diagrams.

Reporters

  • liyi.zhou@sydney.edu.au (Liyi), https://lzhou1110.github.io/
  • ziyue0530@gmail.com (Ziyue), https://zyy0530.github.io/
  • cshe0476@uni.sydney.edu.au (Strick), https://str1ckl4nd.github.io/
  • chng0012@uni.sydney.edu.au (Maurice), http://maurice.busystar.org/
  • cyu210608@gmail.com (Chenchen), https://7thparkk.github.io/

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
popular JS diagramming library embedded in many documentation platforms
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA 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 LOW
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

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