{"id":"CVE-2026-71437","aliases":["CVE-2026-71437","GHSA-3rrr-jr9j-h3q3"],"related":[],"kind":"vulnerability","state":"published","title":"Mermaid Architecture diagrams are vulnerable to prototype pollution","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Rendering an untrusted `architecture-beta` diagram lets the diagram author write an arbitrary property with the value `horizontal` or `vertical` onto `Object.prototype`. A group id of `__proto__` is accepted as a valid parent.\n\n### Impact\n\nAny code in the same realm that reads a property of that name from an arbitrary object, or enumerates an object with bare `for...in`, observes the injected value (which can only be the string `horizontal` or `vertical`.\n\nThis may mean corrupted option/config defaults, bypassed truthiness checks, causing denial of service or logic corruption in the embedding application.\n\nBecause the injected value cannot be an object or function, this is not directly exploitable for remote code execution.\n\n### PoC\n\n```\narchitecture-beta\n      group mermaidPrototypePollutionMarker(cloud)[Marker]\n      service a(server)[A] in __proto__\n      service b(server)[B] in mermaidPrototypePollutionMarker\n      a:R -- L:b\n```\n\nThe vulnerable write was introduced in commit [cb0a4703bdf01d47508bde1c08aa9a980d70bc20](https://github.com/mermaid-js/mermaid/commit/cb0a4703bdf01d47508bde1c08aa9a980d70bc20) and first shipped in `mermaid@11.5.0`. The lines are unchanged in every release since.\n\n### Patches\n\nThis has been patched by https://github.com/mermaid-js/mermaid/commit/99af3fc35ef0a9a9c8c6314521344d67523ddccf, released in [Mermaid v11.16.1](https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1)\n\n### Workarounds\n\nThere are no known workarounds. Please update to a patched version.\n\n### References\n\n_Are there any links users can visit to find out more?_\n\n- https://github.com/mermaid-js/mermaid/commit/99af3fc35ef0a9a9c8c6314521344d67523ddccf\n- https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.16.1","format":"markdown","source":"ghsa"},{"lang":"es","text":"Mermaid es una herramienta de JavaScript que utiliza texto inspirado en Markdown para crear y modificar diagramas y gráficos. Desde la versión 11.5.0 hasta la 11.16.1, los diagramas de arquitectura de Mermaid son vulnerables a la contaminación de prototipos cuando un diagrama define un grupo con un ID de __proto__. Debido a que el ID del grupo se utiliza directamente como clave de propiedad de objeto sin validación, un atacante que puede proporcionar texto de diagrama puede contaminar Object.prototype, afectando potencialmente el comportamiento de la aplicación incrustada. Este problema está solucionado en la versión 11.16.1.","source":"nvd"}],"published":"2026-08-06T19:51:52.975Z","modified":"2026-10-24T15:10:00.190Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"version":">= 11.5.0, < 11.16.1","status":"affected"}],"vendor":"mermaid-js","product":"mermaid","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"11.5.0","status":"affected","fixed":"11.16.1"}],"ecosystem":"npm","package":"mermaid","purl":"pkg:npm/mermaid","source":"ghsa"}],"references":[{"url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-3rrr-jr9j-h3q3","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mermaid-js/mermaid/pull/8022","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mermaid-js/mermaid/commit/99af3fc35ef0a9a9c8c6314521344d67523ddccf","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mermaid-js/mermaid/releases/tag/mermaid@11.16.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mermaid-js/mermaid","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-07T17:37:12.586Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-71437","url":"https://www.cve.org/CVERecord?id=CVE-2026-71437","licence":"CVE Terms of Use","modified":"2026-08-07T17:37:35.933Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3rrr-jr9j-h3q3","url":"https://github.com/advisories/GHSA-3rrr-jr9j-h3q3","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:12.960Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-71437","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71437","licence":"Public domain","modified":"2026-10-24T15:10:00.190Z"}],"updatedAt":"2026-11-25T22:59:31.810Z","epss":{"score":0.00503,"percentile":0.36127,"date":"2026-11-30T12:00:22.000Z"}}