CVE-2026-71437
JavaScript Análisis y mitigación de vulnerabilidades

Vista general

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

Técnicas

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

Impacto

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

Explotabilidad

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

Pasos de explotación

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

Indicadores de compromiso

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

Mitigación y soluciones alternativas

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

Recursos adicionales


FuenteEste informe se generó utilizando IA

Relacionado JavaScript Vulnerabilidades:

CVE ID

Severidad

Puntuación

Tecnologías

Nombre del componente

Exploit de CISA KEV

Tiene arreglo

Fecha de publicación

CVE-2026-71476HIGH8.7
  • JavaScript logoJavaScript
  • @nx/gcs-cache
NoAug 06, 2026
CVE-2026-71437MEDIUM6.5
  • JavaScript logoJavaScript
  • 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

Evaluación gratuita de vulnerabilidades

Compare su postura de seguridad en la nube

Evalúe sus prácticas de seguridad en la nube en 9 dominios de seguridad para comparar su nivel de riesgo e identificar brechas en sus defensas.

Solicitar evaluación

Recursos adicionales de Wiz

Obtén una demostración personalizada

¿Listo para ver a Wiz en acción?

"La mejor experiencia de usuario que he visto en mi vida, proporciona una visibilidad completa de las cargas de trabajo en la nube."
David EstlickCISO
"Wiz proporciona un panel único para ver lo que ocurre en nuestros entornos en la nube."
Adam FletcherJefe de Seguridad
"Sabemos que si Wiz identifica algo como crítico, en realidad lo es."
Greg PoniatowskiJefe de Gestión de Amenazas y Vulnerabilidades