SB2026080474 - Multiple vulnerabilities in mermaid
Published: August 4, 2026
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 5 vulnerabilities.
1) Prototype pollution (CVE-ID: N/A)
CWE-ID: CWE-1321 - Improperly Controlled Modification of Object Prototype Attributes (\'Prototype Pollution\')
CVSSv4: 7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N]
The vulnerability allows a remote user to cause a denial of service or corrupt application logic.
The vulnerability exists due to improperly controlled modification of object prototype attributes ('prototype pollution') in the architecture-beta diagram renderer when rendering an untrusted diagram. A remote user can supply a crafted diagram with a group id of __proto__ to cause a denial of service or corrupt application logic.
The injected property value is limited to the string horizontal or vertical and does not directly enable remote code execution.
2) Unchecked Input for Loop Condition (CVE-ID: N/A)
CWE-ID: CWE-606 - Unchecked Input for Loop Condition
CVSSv4: 4.6 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]
The vulnerability allows a remote attacker to cause a denial of service.
The vulnerability exists due to unchecked input for loop condition in radar diagram rendering when processing a crafted ticks value. A remote attacker can supply a specially crafted radar diagram to cause a denial of service.
User interaction is required to render the crafted diagram.
3) Infinite loop (CVE-ID: N/A)
CWE-ID: CWE-835 - Loop with Unreachable Exit Condition ('Infinite Loop')
CVSSv4: 4.6 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]
The vulnerability allows a remote attacker to cause a denial of service.
The vulnerability exists due to a loop with an unreachable exit condition in the setXAxisRangeData() function when processing crafted XY chart input with invalid x-axis parameters. A remote attacker can supply specially crafted chart data to cause a denial of service.
User interaction is required to load or render the crafted chart content.
4) Prototype pollution (CVE-ID: N/A)
CWE-ID: CWE-1321 - Improperly Controlled Modification of Object Prototype Attributes (\'Prototype Pollution\')
CVSSv4: 4.6 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N]
The vulnerability allows a local privileged user to modify object prototypes.
The vulnerability exists due to improperly controlled modification of object prototype attributes in the mermaid configuration setters when merging caller-supplied configuration objects into the internal config. A local privileged user can supply a crafted configuration object to modify object prototypes.
The issue is only reachable if an application forwards attacker-controlled data directly into these configuration entry points; user-controlled configuration in diagram code and YAML frontmatter is already protected.
5) Code Injection (CVE-ID: CVE-2026-50159)
CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')
CVSSv4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N]
The vulnerability allows a remote attacker to manipulate the user interface of adjacent page elements.
The vulnerability exists due to improper control of generated stylesheet content in the CSS scoping middleware when processing attacker-supplied diagram source. A remote attacker can supply crafted CSS selectors using sibling combinators to manipulate the user interface of adjacent page elements.
This affects cases where the rendered SVG is inserted into the DOM alongside sibling elements rather than being the only child of its parent.
Remediation
Install update from vendor's website.
References
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-3rrr-jr9j-h3q3
- https://github.com/mermaid-js/mermaid/commit/99af3fc35ef0a9a9c8c6314521344d67523ddccf
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-rhh3-jpg6-66xh
- https://github.com/mermaid-js/mermaid/commit/59b22fad2b3bb04f87a476c84a8a2b24679e607e
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-2v8p-3f2j-5mp7
- https://github.com/mermaid-js/mermaid/commit/630aa7e5dd417e1f56bff2a1ce8df2c5ad08d289
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-c4c3-pg64-4m4v
- https://github.com/mermaid-js/mermaid/commit/2cd6dcf735533b323507e3e889ffdea870540b43
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-6x64-9x62-f2gx
- https://github.com/mermaid-js/mermaid/commit/12d472c9ed43f94814b110da8d7a9ae6dd5266ed