CVE-2026-71438: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in mermaid-js mermaid
A prototype pollution vulnerability exists in mermaid-js mermaid prior to versions 10.9.8 and 11.16.1. The issue arises from the way configuration setters merge user-supplied configuration into internal config using a deep-merge helper, which can be exploited if untrusted data is passed directly to these setters. This misuse is outside documented usage, and diagram-supplied configuration is not affected. The vulnerability has a low severity score and is fixed in versions 10.9.8 and 11.16.1.
AI Analysis
Technical Summary
Mermaid-js mermaid versions before 10.9.8 and 11.16.1 have a prototype pollution vulnerability (CWE-1321) in their configuration setters (mermaid.initialize, mermaidAPI.setConfig, mermaidAPI.updateSiteConfig). These setters use the assignWithDepth deep-merge helper to merge caller-supplied configuration into the internal config, which is vulnerable to prototype pollution. Exploitation requires an application to forward untrusted data directly into these configuration entry points, which is not the intended or documented usage. Diagram-supplied configuration methods such as %%{init: {}}%% or YAML frontmatter are not vulnerable. The vulnerability is addressed in versions 10.9.8 and 11.16.1.
Potential Impact
If an application improperly forwards untrusted input directly into the vulnerable configuration setters, an attacker could manipulate the prototype of internal objects, potentially leading to unexpected behavior or security issues. However, this requires a specific misuse pattern outside the documented usage, limiting the practical impact. The vulnerability does not affect diagram-supplied configuration inputs. The CVSS 4.0 base score is 2.4, indicating low severity.
Mitigation Recommendations
Upgrade mermaid-js mermaid to version 10.9.8 or later, or 11.16.1 or later, where the prototype pollution vulnerability is fixed. Avoid passing untrusted data directly into the configuration setters (mermaid.initialize, mermaidAPI.setConfig, mermaidAPI.updateSiteConfig). Diagram-supplied configuration methods are not vulnerable and require no changes.
CVE-2026-71438: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in mermaid-js mermaid
Description
A prototype pollution vulnerability exists in mermaid-js mermaid prior to versions 10.9.8 and 11.16.1. The issue arises from the way configuration setters merge user-supplied configuration into internal config using a deep-merge helper, which can be exploited if untrusted data is passed directly to these setters. This misuse is outside documented usage, and diagram-supplied configuration is not affected. The vulnerability has a low severity score and is fixed in versions 10.9.8 and 11.16.1.
CVSS v4.0
Score 2.4low
Affected software
mermaid-js
mermaid
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mermaid-js mermaid versions before 10.9.8 and 11.16.1 have a prototype pollution vulnerability (CWE-1321) in their configuration setters (mermaid.initialize, mermaidAPI.setConfig, mermaidAPI.updateSiteConfig). These setters use the assignWithDepth deep-merge helper to merge caller-supplied configuration into the internal config, which is vulnerable to prototype pollution. Exploitation requires an application to forward untrusted data directly into these configuration entry points, which is not the intended or documented usage. Diagram-supplied configuration methods such as %%{init: {}}%% or YAML frontmatter are not vulnerable. The vulnerability is addressed in versions 10.9.8 and 11.16.1.
Potential Impact
If an application improperly forwards untrusted input directly into the vulnerable configuration setters, an attacker could manipulate the prototype of internal objects, potentially leading to unexpected behavior or security issues. However, this requires a specific misuse pattern outside the documented usage, limiting the practical impact. The vulnerability does not affect diagram-supplied configuration inputs. The CVSS 4.0 base score is 2.4, indicating low severity.
Mitigation Recommendations
Upgrade mermaid-js mermaid to version 10.9.8 or later, or 11.16.1 or later, where the prototype pollution vulnerability is fixed. Avoid passing untrusted data directly into the configuration setters (mermaid.initialize, mermaidAPI.setConfig, mermaidAPI.updateSiteConfig). Diagram-supplied configuration methods are not vulnerable and require no changes.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-06T16:28:51.183Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a75070fbf8831d5395f5ddb
Added to database: 08/06/2026, 22:13:35 UTC
Last enriched: 08/14/2026, 16:12:16 UTC
Last updated: 09/21/2026, 22:01:37 UTC
Views: 55
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.