Skip to content

fix(deps): update dependency mermaid to v11.16.1 [security] - #10911

Merged
eliandoran merged 1 commit into
mainfrom
renovate/npm-mermaid-vulnerability
Aug 8, 2026
Merged

fix(deps): update dependency mermaid to v11.16.1 [security]#10911
eliandoran merged 1 commit into
mainfrom
renovate/npm-mermaid-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
mermaid 11.16.011.16.1 age confidence

Mermaid 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 length to 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
xychart
  x-axis 1 --> 1
  line [1, 2]
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 Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L

References

This data is provided by 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-beta diagram lets the diagram author write an arbitrary property with the value horizontal or vertical onto Object.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 string horizontal or vertical.

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
architecture-beta
      group mermaidPrototypePollutionMarker(cloud)[Marker]
      service a(server)[A] in __proto__
      service b(server)[B] in mermaidPrototypePollutionMarker
      a:R -- L:b

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 Score: 6.5 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:H/SI:H/SA:H

References

This data is provided by 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> or element.innerHTML = svg. Alternatively, you can use mermaid.run() or mermaid.initialize() which will do this for you.

Setting "securityLevel": "sandbox" will also prevent this, or setting the secure config value in the mermaid config to avoid allowing diagrams to modify fontFamily, themeCSS, altFontFamily, and themeVariables.

To test, you can try using a themeCSS with & + * { /* my CSS here */} and see if it's applied outside of your mermaid <svg>.

---
config:
  themeCSS: |-
    & + * { background:red !important; width:100vw !important; height:100vh !important; position:fixed !important; inset:0 !important; }
---
info
References

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L

References

This data is provided by 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, 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 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, and mermaidAPI.updateSiteConfig functions. Instead, users can use %%{init: {}}%% or YAML frontmatter in diagrams.

Reporters

Severity

  • CVSS Score: 2.4 / 10 (Low)
  • Vector String: 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

References

This data is provided by 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 1000000000
Patches

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 Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

mermaid-js/mermaid (mermaid)

v11.16.1

Compare Source

Patch Changes

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies PRs or issues relating to dependencies renovate labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation preview is ready!

🔗 Preview URL: https://pr-10911.trilium-docs.pages.dev
📖 Production URL: https://docs.triliumnotes.org

✅ All checks passed

This preview will be updated automatically with new commits.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🖥️ App preview is ready!

🔗 Preview URL: https://pr-10911.trilium-app.pages.dev
📖 Production URL: https://app.triliumnotes.org

✅ All checks passed

This preview will be updated automatically with new commits.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 1.85kB (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
standalone-esm 53.33MB 925 bytes (0.0%) ⬆️
client-esm 48.94MB 925 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: standalone-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
src/chunk-*.js 160 bytes 207.75kB 0.08%
src/src-*.js 65 bytes 209 bytes 45.14% ⚠️
src/src-*.js -65 bytes 144 bytes -31.1%
src/architectureDiagram-*.js 423 bytes 148.98kB 0.28%
src/xychartDiagram-*.js 8 bytes 41.64kB 0.02%
src/mermaid.core-*.js 187 bytes 31.32kB 0.6%
src/diagram-*.js 147 bytes 6.08kB 2.48%
assets/pt-*.js -16 bytes 1.28kB -1.23%
assets/pt-*.js 16 bytes 1.3kB 1.25%
view changes for bundle: client-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
src/chunk-*.js 160 bytes 207.75kB 0.08%
src/src-*.js 65 bytes 209 bytes 45.14% ⚠️
src/src-*.js -65 bytes 144 bytes -31.1%
src/dist-*.js 26 bytes 82 bytes 46.43% ⚠️
src/dist-*.js -26 bytes 56 bytes -31.71%
src/architectureDiagram-*.js 423 bytes 148.98kB 0.28%
src/xychartDiagram-*.js 8 bytes 41.64kB 0.02%
src/mermaid.core-*.js 187 bytes 31.32kB 0.6%
src/diagram-*.js 147 bytes 6.08kB 2.48%

@renovate
renovate Bot force-pushed the renovate/npm-mermaid-vulnerability branch from 41261d1 to 6e5bd98 Compare August 7, 2026 11:02
@renovate renovate Bot changed the title Update dependency mermaid to v11.16.1 [SECURITY] fix(deps): update dependency mermaid to v11.16.1 [security] Aug 7, 2026
@renovate
renovate Bot force-pushed the renovate/npm-mermaid-vulnerability branch from 6e5bd98 to 87485d8 Compare August 8, 2026 06:20
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@renovate
renovate Bot force-pushed the renovate/npm-mermaid-vulnerability branch from 87485d8 to fab55f1 Compare August 8, 2026 09:12
@renovate
renovate Bot force-pushed the renovate/npm-mermaid-vulnerability branch from fab55f1 to fc9195f Compare August 8, 2026 09:32
@eliandoran
eliandoran merged commit 6e77077 into main Aug 8, 2026
18 checks passed
@eliandoran
eliandoran deleted the renovate/npm-mermaid-vulnerability branch August 8, 2026 12:00
@eliandoran eliandoran added this to the v0.105.0 milestone Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies PRs or issues relating to dependencies renovate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant