# CVE-2026-71438: Mermaid prototype pollution in configuration APIs

Source: https://junglewise.ai/threats/cve-2026-71438-mermaid-prototype-pollution-in-configuration-apis  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-06. Updated: 2026-08-06  
License: CC BY 4.0 with a link back

CVE-2026-71438 · Severity: medium · CVSS 4 · Published 2026-08-06

Mermaid, a popular JavaScript-based diagramming and charting tool, contains a vulnerability in how it handles configuration settings. If an application using Mermaid allows untrusted users to provide configuration data directly, an attacker could potentially manipulate the tool's internal behavior. While the risk is considered low because these settings are typically only managed by developers, it could lead to unauthorized changes in how diagrams are rendered or processed.

Technologies: [mermaid (npm)](https://junglewise.ai/threats/technologies/mermaid). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-71438 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-71438 being exploited in the wild.

**How severe is CVE-2026-71438?** Medium severity, with a CVSS score of 4, published 6 August 2026.

**Which products and versions are affected?** mermaid (npm) SEMVER:introduced=11.0.0-alpha.1,fixed=11.16.1.

**Is there a fix for CVE-2026-71438?** Yes. mermaid (npm): upgrade to 11.16.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-71438 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-71438?** Check whether you run mermaid (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mermaid (npm): upgrade to 11.16.1 or later

  ```sh
  npm install mermaid@11.16.1
  ```


## Technical details

A prototype pollution vulnerability exists in Mermaid's configuration setters, including mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig. The root cause is the use of a vulnerable deep-merge helper, assignWithDepth, which fails to properly sanitize property keys when merging caller-supplied objects into the internal configuration. An attacker could exploit this if an integrating application passes untrusted, user-controlled data directly into these configuration entry points. Successful exploitation could allow an attacker to modify the global Object prototype, potentially leading to property injection or other side effects. The issue is patched in versions 11.16.1 and 10.9.8.

## Affected products

- mermaid-js mermaid >= 11.0.0-alpha.1, < 11.16.1; < 10.9.8

## Identifiers

- CVE-2026-71438
- GHSA-c4c3-pg64-4m4v

## Timeline

- 2026-08-04: disclosed
- 2026-08-06: advisory: GitHub Advisory published

## References

- [https://api.github.com/users/Str1ckl4nd](https://api.github.com/users/Str1ckl4nd)
- [https://github.com/Str1ckl4nd](https://github.com/Str1ckl4nd)
- [https://api.github.com/users/Str1ckl4nd/gists%7B/gist_id%7D](https://api.github.com/users/Str1ckl4nd/gists%7B/gist_id%7D)
- [https://api.github.com/users/Str1ckl4nd/repos](https://api.github.com/users/Str1ckl4nd/repos)
- [https://avatars.githubusercontent.com/u/73695323?v=4](https://avatars.githubusercontent.com/u/73695323?v=4)
- [https://api.github.com/users/Str1ckl4nd/events%7B/privacy%7D](https://api.github.com/users/Str1ckl4nd/events%7B/privacy%7D)

## Related threats

- [Mermaid radar diagrams denial of service via unchecked ticks input](https://junglewise.ai/threats/cve-2026-71439-mermaid-radar-diagrams-denial-of-service-via-unchecked-ticks)
- [Mermaid prototype pollution in architecture-beta diagrams](https://junglewise.ai/threats/cve-2026-71437-mermaid-prototype-pollution-in-architecture-beta-diagrams)
- [Mermaid infinite loop in XY Charts axis processing](https://junglewise.ai/threats/cve-2026-71436-mermaid-infinite-loop-in-xy-charts-axis-processing)
- [Mermaid CSS injection via sibling combinators](https://junglewise.ai/threats/cve-2026-50159-mermaid-css-injection-via-sibling-combinators)
- [Mermaid CSS injection via configuration options](https://junglewise.ai/threats/cve-2026-41159-mermaid-css-injection-via-configuration-options)
