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: < 1% Very Low
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. The EPSS score of less than 1% indicates a very low probability that the vulnerability will be exploited. 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 9, 2026 at 13: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 9, 2026 at 13: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

Sun, 09 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-915
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.0, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L'}

threat_severity

Moderate


Fri, 07 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 07 Aug 2026 09:15:00 +0000

Type Values Removed Values Added
First Time appeared Mermaid Project
Mermaid Project mermaid
Vendors & Products Mermaid Project
Mermaid Project mermaid

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

Mermaid Project Mermaid
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T15:40:29.335Z

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

Link: CVE-2026-71438

cve-icon Vulnrichment

Updated: 2026-08-07T15:40:24.344Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:18:30.873

Modified: 2026-08-07T16:17:28.153

Link: CVE-2026-71438

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-06T19:59:07Z

Links: CVE-2026-71438 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-09T14:00:04Z

Weaknesses
  • CWE-1321

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

  • CWE-915

    Improperly Controlled Modification of Dynamically-Determined Object Attributes