Prototype pollution in mermaid - #VU140936
Published: August 4, 2026
Vulnerability details
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.