Description
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. From version 11.5.0 until 11.16.1, Mermaid Architecture Diagrams are vulnerable to prototype pollution when a diagram defines a group with an id of __proto__. Because the group id is used directly as an object property key without validation, an attacker who can supply diagram text can pollute Object.prototype, potentially affecting the behavior of the embedding application. This issue is fixed in version 11.16.1.
Published: 2026-08-06
Score: 6.5 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mermaid Architecture Diagrams allow defining a group with the identifier __proto__. Because this value is used unvalidated as a property key, an attacker who can supply diagram text can inject properties into Object.prototype. The resulting prototype pollution can modify the logic of the embedding JavaScript application, potentially leading to unexpected behaviour or serving as a foothold for more complex attacks. While the vulnerability is not a direct code‑execution flaw, it can impact confidentiality, integrity, or availability of the application depending on how the polluted properties are accessed.

Affected Systems

Affected software is mermaid-js:mermaid, from version 11.5.0 through 11.16.1 inclusive. Users that employ the Architecture diagram rendering feature in any of those releases are vulnerable. Versions released after 11.16.1 incorporate the fix and are not affected.

Risk and Exploitability

The CVSS score of 6.5 indicates moderate severity. EPSS data is unavailable and the flaw is not listed in CISA’s KEV catalog, suggesting no public exploits yet. The likely attack vector is the supply of diagram text through a web-based editor, a public graph import, or any interface that accepts user‑supplied diagram syntax. Because the vulnerability depends on the host application’s use of Object.prototype, exploitation likelihood varies with the complexity of the application’s JavaScript logic.

Generated by OpenCVE AI on August 7, 2026 at 01:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade mermaid to version 11.16.1 or later to remove the prototype pollution flaw
  • If an upgrade is not immediately possible, configure the parser to reject or sanitize group identifiers that equal "__proto__" before they are used as object keys
  • Enforce a Content Security Policy that restricts eval‑like functions and limits script execution, mitigating potential downstream exploitation of polluted prototypes

Generated by OpenCVE AI on August 7, 2026 at 01:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-3rrr-jr9j-h3q3 Mermaid Architecture diagrams are vulnerable to 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. From version 11.5.0 until 11.16.1, Mermaid Architecture Diagrams are vulnerable to prototype pollution when a diagram defines a group with an id of __proto__. Because the group id is used directly as an object property key without validation, an attacker who can supply diagram text can pollute Object.prototype, potentially affecting the behavior of the embedding application. This issue is fixed in version 11.16.1.
Title Mermaid Architecture diagrams are vulnerable to prototype pollution
Weaknesses CWE-1321
References
Metrics cvssV4_0

{'score': 6.5, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:H/SI:H/SA:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-06T19:51:52.975Z

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

Link: CVE-2026-71437

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T01:30:04Z

Weaknesses
  • CWE-1321

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