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

> Prototype pollution in Mermaid configuration APIs allows code execution if untrusted data is forwarded to config setters.

- **Severity:** Low 2.4 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:N/VI:L/VA:L/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Aug 2026
- **Updated:** 7 Aug 2026
- **Also known as:** CLEANSTART-2026-VV35394, DEBIAN-CVE-2026-71438, GHSA-c4c3-pg64-4m4v, MINI-3fhf-8668-68p2, MINI-8x6w-8ggq-hjxr, MINI-q26w-9w8x-49c8, MINI-w7h7-6436-p562, UBUNTU-CVE-2026-71438

## What is CVE-2026-71438?

CVE-2026-71438 is a low-severity code injection vulnerability in mermaid-js mermaid, published on 6 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.8 and 11.16.1, Mermaid's configuration setters (mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig) merge caller-supplied configuration into Mermaid's internal config using the assignWithDepth deep-merge helper, which is vulnerable to prototype pollution. This is only exploitable if an application forwards untrusted data directly into one of these configuration entry points, which is outside their documented usage; diagram-supplied configuration (e.g. %%{init: {}}%% or YAML frontmatter) is not affected. This issue is fixed in versions 10.9.8 and 11.16.1.

Weakness: CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

## Which versions are affected by CVE-2026-71438?

4 open source packages ship an affected version, including mermaid.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mermaid` | npm | All versions | 10.9.8 |
| `mermaid` | npm | All versions | 10.9.8 |
| `mermaid` | npm | From 11.0.0-alpha.1 | 11.16.1 |
| `mermaid` | npm | From 11.0.0-alpha.1 | 11.16.1 |

## How do I fix CVE-2026-71438?

Upgrade mermaid to a fixed version for your release line: 10.9.8 or 11.16.1.

## Is CVE-2026-71438 being exploited?

There is no known exploitation of CVE-2026-71438 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-71438 and fix it if it is affected.

What it is: CVE-2026-71438 is a low-severity code injection vulnerability in mermaid-js mermaid, published on 6 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-71438 in the wild and no public exploit code.

Affected packages and fixed versions:
- mermaid (npm): affected all versions; fixed in 10.9.8
- mermaid (npm): affected all versions; fixed in 10.9.8
- mermaid (npm): affected from 11.0.0-alpha.1; fixed in 11.16.1
- mermaid (npm): affected from 11.0.0-alpha.1; fixed in 11.16.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-71438/ (Markdown: https://insights.sbomify.com/CVE-2026-71438/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-71438
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-71438
- OSV: https://osv.dev/vulnerability/CVE-2026-71438

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-71438/
Summaries are generated and may contain mistakes; the official description above is the record.
