chore(deps): update dependency mermaid to v11.16.1 [security] - #12
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.16.0→11.16.1Mermaid XY Charts are vulnerable to an infinite loop DoS
CVE-2026-71436 / GHSA-2v8p-3f2j-5mp7
More information
Details
Impact
Mermaid XY Charts are vulnerable to an infinite loop DoS attack in the
setXAxisRangeData(), when configuring an X-Axis with invalid parameters.As each loop appends an element to an array, this would generally only cause an
RangeError: Invalid array lengthto appear after a few seconds, but may cause the page/JavaScript process to crash due to memory exhaustion, depending on the environment.Proof-of-concept
Patches
This has been patched in mermaid-js/mermaid@630aa7e and released in Mermaid v11.16.1.
A backport has been made for the v10 branch in ef60adc837d9d5107af21285f01e83dea309bd0a and was released in Mermaid v10.9.8
Workarounds
There are no known workarounds. Please update to the latest version or apply the patch.
References
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Mermaid Architecture diagrams are vulnerable to prototype pollution
CVE-2026-71437 / GHSA-3rrr-jr9j-h3q3
More information
Details
Rendering an untrusted
architecture-betadiagram lets the diagram author write an arbitrary property with the valuehorizontalorverticalontoObject.prototype. A group id of__proto__is accepted as a valid parent.Impact
Any code in the same realm that reads a property of that name from an arbitrary object, or enumerates an object with bare
for...in, observes the injected value (which can only be the stringhorizontalorvertical.This may mean corrupted option/config defaults, bypassed truthiness checks, causing denial of service or logic corruption in the embedding application.
Because the injected value cannot be an object or function, this is not directly exploitable for remote code execution.
PoC
The vulnerable write was introduced in commit cb0a4703bdf01d47508bde1c08aa9a980d70bc20 and first shipped in
mermaid@11.5.0. The lines are unchanged in every release since.Patches
This has been patched by mermaid-js/mermaid@99af3fc, released in Mermaid v11.16.1
Workarounds
There are no known workarounds. Please update to a patched version.
References
Are there any links users can visit to find out more?
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:H/SI:H/SA:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Mermaid allows CSS injection applying to sibling elements of the diagram
CVE-2026-50159 / GHSA-6x64-9x62-f2gx
More information
Details
Summary
Mermaid does not fully restrict CSS to the rendered SVG subtree. Although selectors are prefixed with
#mermaid-X, sibling (~and+) combinators can still escape the Mermaid container and inject styles to DOM elements adjacent to the diagram<svg>.Most users of mermaid would not be affected by this, as mermaid adds its
<svg>as an only child of it's parent element. However, you may be affected if you manually insert the<svg>(or other elements) into the DOM yourself.Details
Mermaid namespaces CSS through with a middleware intended to scope all rules to the diagram's SVG element. CSS nesting expands
& ~ * { ... }to#svgId ~ *, which selects all sibling elements following the SVG in the DOM, outside the diagram boundary.Impact
An attacker able to supply diagram source to a page (e.g., user-generated content rendered by Mermaid) could inject CSS rules affecting sibling elements to the diagram
<svg>on the host page. This can be used for UI redressing, hiding content, conditional CSS-based probing, or phishing-style visual manipulation.JavaScript execution is not possible via this vector.
Patches
This has been patched in mermaid-js/mermaid@12d472c and released in Mermaid v11.16.1.
A backport has been made for the v10 branch in 7e83f1533318b307764d961906a73377266f4c5e and was released in Mermaid v10.9.8
Workarounds
If you are inserting the
<svg>into the DOM yourself, you can wrap it in an element with no other children, e.g.<div><svg>...</svg></div>orelement.innerHTML = svg. Alternatively, you can usemermaid.run()ormermaid.initialize()which will do this for you.Setting "securityLevel": "sandbox" will also prevent this, or setting the
secureconfig value in the mermaid config to avoid allowing diagrams to modifyfontFamily,themeCSS,altFontFamily, andthemeVariables.To test, you can try using a
themeCSSwith& + * { /* my CSS here */}and see if it's applied outside of your mermaid<svg>.References
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Mermaid configuration APIs allow prototype pollution
CVE-2026-71438 / GHSA-c4c3-pg64-4m4v
More information
Details
Summary
Mermaid's configuration setters (
mermaid.initialize,mermaidAPI.setConfig, andmermaidAPI.updateSiteConfig) merge the caller-supplied configuration object into Mermaid's internal config using theassignWithDepthdeep-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 mermaid-js/mermaid@2cd6dcf 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, andmermaidAPI.updateSiteConfigfunctions. Instead, users can use%%{init: {}}%%or YAML frontmatter in diagrams.Reporters
Severity
CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:N/VI:L/VA:L/SC:H/SI:H/SA:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Mermaid radar diagrams are vulnerable to DoS
CVE-2026-71439 / GHSA-rhh3-jpg6-66xh
More information
Details
Impact
Mermaid radar diagrams allow arbitrary large values for
ticks, which can cause high CPU usage, freezing the webpage/JavaScript process for long periods of time, until the process is eventually killed due to OOM/running out of memory.Proof-of-concept
radar-beta axis a, b curve c {1, 1} ticks 1000000000Patches
Has the problem been patched? What versions should users upgrade to?
This problem has been patched by mermaid-js/mermaid@59b22fa, which was released in Mermaid v11.16.1
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
There are no known workarounds without updating to a patched version of mermaid.
References
Are there any links users can visit to find out more?
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
mermaid-js/mermaid (mermaid)
v11.16.1Compare Source
Patch Changes
#8022
12d472cThanks @aloisklink! - fix: handle CSS sibling combinators in compileCSS#8022
2cd6dcfThanks @aloisklink! - fix: increase protections against prototype pollutionUser-controlled input already has protections against prototype pollution.
Fixes: GHSA-c4c3-pg64-4m4v
#8022
99af3fcThanks @aloisklink! - fix(architecture): useMaps andSets to store groups/servicesServices are now rendered in the order they are defined and more service IDs
are now supported.
#8022
2cd6dcfThanks @aloisklink! - deprecate: Deprecate themermaidAPI.setConfig()functionCalling this function has no observable effect, as the next time a
render()orparse()is called, thecurrentConfigis cleared.#8022
630aa7eThanks @aloisklink! - fix(xychart): support zero-width x-axis ranges#8022
59b22faThanks @aloisklink! - fix(radar): limit number of ticks to 32Setting a ticks value higher than this would only show 32 ticks.
Configuration
📅 Schedule: (in timezone Europe/Brussels)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.