Description
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.8 and 11.16.1, Mermaid's configuration setters (mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig) merge caller-supplied configuration into Mermaid's internal config using the assignWithDepth deep-merge helper, which is vulnerable to prototype pollution. This is only exploitable if an application forwards untrusted data directly into one of these configuration entry points, which is outside their documented usage; diagram-supplied configuration (e.g. %%{init: {}}%% or YAML frontmatter) is not affected. This issue is fixed in versions 10.9.8 and 11.16.1.
Published: 2026-08-06
Score: 2.4 Low
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mermaid's configuration APIs – mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig – merge caller‑supplied settings into the internal configuration using a deep‑merge helper that is vulnerable to prototype pollution. If an application forwards untrusted data to these entry points, an attacker could add or modify properties on JavaScript prototypes, potentially altering the behavior of Mermaid or other parts of the host application. The flaw is not triggered by the intended diagram‑supplied configuration syntax such as %%{init: {}}%% or YAML frontmatter, and therefore only affects code that incorrectly exposes the APIs to untrusted input.

Affected Systems

Affected versions are those of mermaid-js/mermaid older than 10.9.8 and 11.16.1. Any web application or documentation platform that incorporates those early releases and passes user‑controlled configuration to the mentioned APIs is at risk. The vulnerability applies to the JavaScript client library used to render diagrams on the front end or in Node.js environments.

Risk and Exploitability

The CVSS score of 2.4 indicates a low overall severity, and the vulnerability is not listed in CISA's KEV catalog. Exploitation is limited to environments where an attacker can inject configuration data into one of the APIs, which is outside documented usage. Consequently, the risk is low for properly audited deployments that do not expose the configuration setters to external input but remains a concern for applications that do.

Generated by OpenCVE AI on August 7, 2026 at 00:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to mermaid 10.9.8, 11.16.1, or later versions.
  • Ensure that only trusted data is passed to mermaid.initialize, setConfig, or updateSiteConfig; validate or sanitize any external input.
  • Remove or refactor code that forwards user‑supplied configuration to these APIs; use only diagram syntax for configuration.

Generated by OpenCVE AI on August 7, 2026 at 00:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-c4c3-pg64-4m4v Mermaid configuration APIs allow prototype pollution
History

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.8 and 11.16.1, Mermaid's configuration setters (mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig) merge caller-supplied configuration into Mermaid's internal config using the assignWithDepth deep-merge helper, which is vulnerable to prototype pollution. This is only exploitable if an application forwards untrusted data directly into one of these configuration entry points, which is outside their documented usage; diagram-supplied configuration (e.g. %%{init: {}}%% or YAML frontmatter) is not affected. This issue is fixed in versions 10.9.8 and 11.16.1.
Title Mermaid configuration APIs allow prototype pollution
Weaknesses CWE-1321
References
Metrics cvssV4_0

{'score': 2.4, 'vector': '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-06T19:59:07.450Z

Reserved: 2026-08-06T16:28:51.183Z

Link: CVE-2026-71438

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T01:00:05Z

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')