CVE-2026-71437
JavaScript Analyse et atténuation des vulnérabilités

Aperçu

CVE-2026-71437 is a prototype pollution vulnerability in Mermaid's Architecture Diagram rendering that allows an attacker who can supply diagram text to inject arbitrary properties onto Object.prototype. It affects mermaid (npm) versions >= 11.5.0 and < 11.16.1; the vulnerable code was introduced in commit cb0a4703 and shipped with mermaid@11.5.0. The vulnerability was discovered by ThomasRinsma, reported by jkim-notion, and publicly disclosed on August 6, 2026, with a patch released in mermaid@11.16.1. It carries a CVSS v4.0 base score of 6.5 (Medium) (GitHub Advisory, Mermaid Security Advisory).

Détails techniques

The root cause is CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes). When Mermaid processes an architecture-beta diagram, group IDs are used directly as object property keys without validation. If an attacker specifies a group with the id __proto__, the rendering code writes the layout direction value (horizontal or vertical) directly onto Object.prototype, polluting the prototype chain for all objects in the same JavaScript realm. The precondition is that the attacker must be able to supply diagram text to a Mermaid-rendering application (e.g., a wiki, documentation platform, or any app accepting user-provided Mermaid diagrams). A public proof-of-concept is included in the advisory:

architecture-beta
group mermaidPrototypePollutionMarker(cloud)[Marker]
service a(server)[A] in __proto__
service b(server)[B] in mermaidPrototypePollutionMarker
a:R -- L:b

(Mermaid Security Advisory, Fix Commit).

Impact

Because the injected value is constrained to the strings horizontal or vertical, remote code execution is not directly achievable. However, any JavaScript code in the same realm that reads a property of the polluted name from an arbitrary object, or iterates with a bare for...in loop, will observe the injected value. This can corrupt option/config defaults, bypass truthiness checks, cause denial of service, or introduce logic corruption in the embedding application. The subsequent system impact is rated High for confidentiality, integrity, and availability, reflecting the potential for cascading effects on the host application (GitHub Advisory, Mermaid Security Advisory).

Exploitabilité

A public proof-of-concept diagram payload is included in the official security advisory, making exploitation straightforward for any attacker with the ability to submit diagram text. No in-the-wild exploitation has been reported, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score is 0.0, indicating very low current probability of exploitation in the wild. No threat actor attribution is available (GitHub Advisory, Feedly).

Étapes d’exploitation

  1. Identify target: Find an application that renders user-supplied Mermaid architecture-beta diagrams using mermaid npm versions >= 11.5.0 and < 11.16.1 (e.g., wikis, documentation tools, or note-taking apps with Mermaid integration).
  2. Craft malicious diagram: Prepare an architecture-beta diagram that defines a group with the id __proto__ as a parent for a service, such as:
architecture-beta
group mermaidPrototypePollutionMarker(cloud)[Marker]
service a(server)[A] in __proto__
service b(server)[B] in mermaidPrototypePollutionMarker
a:R -- L:b
  1. Submit diagram: Insert or submit the crafted diagram text into the target application's Mermaid rendering input (e.g., a diagram editor, markdown field, or API endpoint).
  2. Trigger rendering: Cause the application to render the diagram, which triggers the vulnerable code path that writes horizontal or vertical onto Object.prototype.
  3. Achieve impact: The polluted Object.prototype property is now observable by all JavaScript code in the same realm, potentially corrupting configuration defaults, bypassing security checks, or causing denial of service in the embedding application (Mermaid Security Advisory, GitHub Advisory).

Indicateurs de compromis

  • Logs: Application logs showing rendering of architecture-beta diagrams containing group IDs of __proto__ or service declarations with in __proto__.
  • Application Behavior: Unexpected changes in application configuration defaults or logic (e.g., options unexpectedly evaluating as "horizontal" or "vertical" where a boolean or other type is expected); unusual for...in enumeration results in JavaScript runtime.
  • Diagram Content: User-submitted diagram text containing the pattern service <name>(<icon>)[<label>] in __proto__ or a group definition with id __proto__ in architecture-beta diagrams.

Atténuation et solutions de contournement

Upgrade the mermaid npm package to version 11.16.1 or later, which resolves the issue by replacing the vulnerable Record-based ArchitectureGroupAlignments data structure with a Map, preventing prototype pollution. There are no known workarounds for unpatched versions — the vendor explicitly states that updating to the patched version is the only remediation. Applications that allow user-supplied diagram text should treat this upgrade as high priority if they cannot restrict diagram input to trusted users (Mermaid Security Advisory, Release Notes).

Ressources additionnelles


SourceCe rapport a été généré à l’aide de l’IA

Apparenté JavaScript Vulnérabilités:

Identifiant CVE

Sévérité

Score

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

CVE-2026-71476HIGH8.7
  • JavaScript logoJavaScript
  • @nx/gcs-cache
NonOuiAug 06, 2026
CVE-2026-71437MEDIUM6.5
  • JavaScript logoJavaScript
  • mermaid
NonOuiAug 06, 2026
CVE-2026-71439MEDIUM5.3
  • JavaScript logoJavaScript
  • mermaid
NonOuiAug 06, 2026
CVE-2026-71498MEDIUM5.1
  • JavaScript logoJavaScript
  • re2
NonOuiAug 06, 2026
CVE-2026-71438LOW2.4
  • JavaScript logoJavaScript
  • mermaid
NonOuiAug 06, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité dans le cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité pour évaluer votre niveau de risque et identifier les failles dans vos défenses.

Demander une évaluation

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités