Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker submits crafted config payload
-
DeliveryApplication forwards user input to mermaid.initialize
-
ExploitassignWithDepth merges __proto__ key unsanitized
-
ExecutionObject.prototype polluted in JavaScript runtime
-
ImpactExploit 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: |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (https://github.com/mermaid-js/mermaid).
CVSS VectorVendor: https://github.com/mermaid-js/mermaid
Lifecycle Timeline
1DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Prototype Pollution
View allPrototype pollution in Adobe Acrobat Reader versions 24.001.30356, 26.001.21367 and earlier enables arbitrary code execu
All versions of package dojo are vulnerable to Prototype Pollution via the setObject function. Rated critical severity (
Prototype pollution in the farinspace Partners WordPress plugin (versions up to and including 0.2.0) enables remote unau
The package handlebars before 4.7.7 are vulnerable to Prototype Pollution when selecting certain compiling options to co
This affects the package ini before 1.3.6. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitabl
Prototype pollution vulnerability in 'deephas' versions 1.0.0 through 1.0.5 allows attacker to cause a denial of service
A Prototype Pollution issue in Cronvel Tree-kit v.0.7.4 and before allows a remote attacker to execute arbitrary code vi
A Prototype Pollution issue in Aliconnect /sdk v.0.0.6 allows an attacker to execute arbitrary code via the aim function
All versions of the package safe-eval are vulnerable to Prototype Pollution via the safeEval function, due to improper s
This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr
Prototype Pollution in chargeover redoc v2.0.9-rc.69 allows attackers to execute arbitrary code or cause a Denial of Ser
alizeait unflatto <= 1.0.2 was discovered to contain a prototype pollution via the method exports.unflatto at /dist/inde
EUVD-2026-54244
GHSA-c4c3-pg64-4m4v
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB