GHSA-c4c3-pg64-4m4v

Suggest an improvement
Source
https://github.com/advisories/GHSA-c4c3-pg64-4m4v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-c4c3-pg64-4m4v/GHSA-c4c3-pg64-4m4v.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-c4c3-pg64-4m4v
Aliases
  • CVE-2026-71438
Downstream
Related
Published
2026-08-06T19:59:10Z
Modified
2026-08-07T21:11:57.991923129Z
Severity
  • 2.4 (Low) CVSS_V4 - 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 CVSS Calculator
Summary
Mermaid configuration APIs allow prototype pollution
Details

Summary

Mermaid's configuration setters (mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig) merge the caller-supplied configuration object into Mermaid's internal config using the assignWithDepth deep-merge helper that is vulnerable to prototype pollution.

Because these APIs are intended to receive trusted configuration supplied by the application integrating Mermaid, Mermaid assesses the practical risk as low. The vulnerability is only reachable if an application forwards attacker-controlled data directly into one of these configuration entry points, which is outside their documented usage.

User-controlled configuration (e.g. configuration in diagram code using %%{init: {}}%% or YAML frontmatter) are already protected from prototype pollution.

Patches

This has been patched in https://github.com/mermaid-js/mermaid/commit/2cd6dcf735533b323507e3e889ffdea870540b43 and released in Mermaid v11.16.1.

A backport has been made for the v10 branch in c34b07a0815842327e70794d69b0c8c5a1e2a956 and was released in Mermaid v10.9.8

Impact

Mermaid believes it's unlikely that anybody is impacted, as these functions are configuration entry points expected to receive trusted, developer-controlled values as they can modify other security-relevant configuration.

Workarounds

Don't pass user-controlled data to the mermaid.initialize, mermaidAPI.setConfig, and mermaidAPI.updateSiteConfig functions. Instead, users can use %%{init: {}}%% or YAML frontmatter in diagrams.

Reporters

  • liyi.zhou@sydney.edu.au (Liyi), https://lzhou1110.github.io/
  • ziyue0530@gmail.com (Ziyue), https://zyy0530.github.io/
  • cshe0476@uni.sydney.edu.au (Strick), https://str1ckl4nd.github.io/
  • chng0012@uni.sydney.edu.au (Maurice), http://maurice.busystar.org/
  • cyu210608@gmail.com (Chenchen), https://7thparkk.github.io/
Database specific
{
    "github_reviewed_at": "2026-08-06T19:59:10Z",
    "github_reviewed": true,
    "severity": "LOW",
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-1321"
    ]
}
References

Affected packages

npm / mermaid

Package

Affected ranges

Type
SEMVER
Events
Introduced
11.0.0-alpha.1
Fixed
11.16.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-c4c3-pg64-4m4v/GHSA-c4c3-pg64-4m4v.json"

npm / mermaid

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
10.9.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-c4c3-pg64-4m4v/GHSA-c4c3-pg64-4m4v.json"