CVE-2026-71437
JavaScript Analisi e mitigazione delle vulnerabilità

Panoramica

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).

Dettagli tecnici

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).

Impatto

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).

Sfruttabilità

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).

Passaggi di sfruttamento

  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).

Indicatori di compromesso

  • 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.

Mitigazione e soluzioni alternative

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).

Risorse aggiuntive


FonteQuesto report è stato generato utilizzando l'intelligenza artificiale

Imparentato JavaScript Vulnerabilità:

CVE ID

Severità

Punteggio

Tecnologie

Nome del componente

Exploit CISA KEV

Ha la correzione

Data di pubblicazione

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

Valutazione gratuita delle vulnerabilità

Benchmark della tua posizione di sicurezza del cloud

Valuta le tue pratiche di sicurezza cloud in 9 domini di sicurezza per confrontare il tuo livello di rischio e identificare le lacune nelle tue difese.

Richiedi valutazione

Richiedi una demo personalizzata

Pronti a vedere Wiz in azione?

"La migliore esperienza utente che abbia mai visto offre piena visibilità ai carichi di lavoro cloud."
David EstlickCISO (CISO)
"Wiz fornisce un unico pannello di controllo per vedere cosa sta succedendo nei nostri ambienti cloud."
Adam FletcherResponsabile della sicurezza
"Sappiamo che se Wiz identifica qualcosa come critico, in realtà lo è."
Greg PoniatowskiResponsabile della gestione delle minacce e delle vulnerabilità