fix(deps): update dependency mermaid to v11.10.0 [security] #1724
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.8.1->11.10.0GitHub Vulnerability Alerts
CVE-2025-54880
Summary
In the default configuration of mermaid 11.9.0, user supplied input for architecture diagram icons is passed to the d3
html()method, creating a sink for cross site scripting.Details
Architecture diagram service
iconTextvalues are passed to the d3html()method, allowing malicious users to inject arbitrary HTML and cause XSS when mermaid-js is used in it's default configuration.The vulnerability lies here:
This issue was introduced with 734bde38777c9190a5a72e96421c83424442d4e4, around 15 months ago, I've not dug into which version of mermaid was first affected.
PoC
Render the following diagram and observe the modified DOM.
Here is a PoC on mermaid.live: https://mermaid.live/edit#pako:eNo9T8FOwzAM_ZXI4rBJpWrpRtuIISF24caZZdKyxOsiLUnlJjCo-u9kQ8wX-_n5-dkjKK8ROEhSRxNQhUh4v8cghWMpOvKxZ7I3M3XyUc83L-9v2z9qQPo0CpneMwFPxnZsILU6M--QyNNKCAHaq2jRhfyL0vLZ7jwMiWd3443Q3krjpt38Mv4sgG3WMsi9HHDLjLs4CwcZdGQ08EARM7BISZMgjJdLBIQjWhTAU6nxIOMpCBBuSrJeug_v7b8yPdMdgR_kaUgo9loGXBvZkbS3LqHTSK8-ugC8LMrrEuAjnIEvlnlVL9q6rZu6Lh-rRQbfwKuyyZuybcvqIaWiqKcMfq6uRd7Uy-kXhYFzcA
Impact
XSS on all sites that use mermaid and render user supplied diagrams without further sanitization.
Remediation
Sanitize the value of
iconTextbefore passing it tohtml().CVE-2025-54881
Summary
In the default configuration of mermaid 11.9.0, user supplied input for sequence diagram labels is passed to
innerHTMLduring calculation of element size, causing XSS.Details
Sequence diagram node labels with KaTeX delimiters are passed through
calculateMathMLDimensions. This method passes the full label toinnerHTMLwhich allows allows malicious users to inject arbitrary HTML and cause XSS when mermaid-js is used in it's default configuration (with KaTeX support enabled).The vulnerability lies here:
The
calculateMathMLDimensionsmethod was introduced in 5c69e5fdb004a6d0a2abe97e23d26e223a059832 two years ago, which was released in Mermaid 10.9.0.PoC
Render the following diagram and observe the modified DOM.
Here is a PoC on mermaid.live: https://mermaid.live/edit#pako:eNpVUMtOwzAQ_BWzyoFKaRTyaFILiio4IK7ckA-1km1iKbaLY6spUf4dJ0AF68uOZ2dm7REqXSNQ6PHDoarwWfDGcMkUudaJGysqceLKkj3hPdl3osJ7IRvSm-qBwcCAaIXGaONRrSsnUdnobITF28PQ954lwXglai25UNNhxWAXBMyXxcGOi-3kL_5k79e73atuFSUv2HWazH1IWn0m3CC5aPf4b3p2WK--BW-4DJCOWzQ3TM0HQmiMqIFa4zAEicZv4iGMsw0D26JEBtS3NR656ywDpiYv869_11r-Ko12TQv0yLveI3eqfcjP111HUNVonrRTFuhdsVgAHWEAmuRxlG7SuEzKMi-yJAnhAjTLIk_EcbFJtuk2y9MphM8lM47KIp--AOZghtU
Impact
XSS on all sites that use mermaid and render user supplied diagrams without further sanitization.
Remediation
The value of the
textargument for thecalculateMathMLDimensionsmethod needs to be sanitized before getting passed on toinnerHTML.Release Notes
mermaid-js/mermaid (mermaid)
v11.10.0Compare Source
Minor Changes
daf8d8dThanks @SpecularAura! - feat: Added support for per link curve styling in flowchart diagram using edge idsPatch Changes
#6857
b9ef683Thanks @knsv! - feat: Exposing elk configuration forceNodeModelOrder and considerModelOrder to the mermaid configuration#6653
2c0931dThanks @darshanr0107! - chore: Remove the "-beta" suffix from the XYChart, Block, Sankey diagrams to reflect their stable status#6683
33e08daThanks @darshanr0107! - fix: Position the edge label in state diagram correctly relative to the edge#6693
814b68bThanks @darshanr0107! - fix: Apply correct dateFormat in Gantt chart to show only day when specified#6734
fce7cabThanks @darshanr0107! - fix: handle exclude dates properly in Gantt charts when using dateFormat: 'YYYY-MM-DD HH:mm:ss'#6733
fc07f0dThanks @omkarht! - fix: fixed connection gaps in flowchart for roundedRect, stadium and diamond shape#6876
12e01bdThanks @sidharthv96! - fix: sanitize icon labels and icon SVGsResolves CVE-2025-54880 reported by @fourcube
#6801
01aaef3Thanks @sidharthv96! - fix: Update casing of ID in requirement diagram#6796
c36cd05Thanks @HashanCP! - fix: Make flowchart elk detector regex match less greedy#6702
8bb29fcThanks @qraqras! - fix(block): overflowing blocks no longer affect later linesThis may change the layout of block diagrams that have overflowing lines
(i.e. block diagrams that use up more columns that the
columnsspecifier).#6717
71b04f9Thanks @darshanr0107! - fix: log warning for blocks exceeding column widthThis update adds a validation check that logs a warning message when a block's width exceeds the defined column layout.
#6820
c99bce6Thanks @kriss-u! - fix: Add escaped class literal name on namespace#6332
6cc1926Thanks @ajuckel! - fix: Allow equals sign in sequenceDiagram labels#6651
9da6fb3Thanks @darshanr0107! - Add validation for negative values in pie charts:Prevents crashes during parsing by validating values post-parsing.
Provides clearer, user-friendly error messages for invalid negative inputs.
#6803
e48b0baThanks @omkarht! - chore: migrate to class-based ArchitectureDB implementation#6838
4d62d59Thanks @saurabhg772244! - fix: node border style for handdrawn shapes#6739
e9ce8cfThanks @kriss-u! - fix: Update flowchart direction TD's behavior to be the same as TB#6833
9258b29Thanks @darshanr0107! - fix: correctly render non-directional lines for '---' in block diagrams#6855
da90f67Thanks @sidharthv96! - fix: fallback to raw text instead of rendering Unsupported markdown or empty blocksInstead of printing Unsupported markdown: XXX, or empty blocks when using a markdown feature
that Mermaid does not yet support when
htmlLabels: true(default) orhtmlLabels: false,fallback to the raw markdown text.
#6876
0133f1cThanks @sidharthv96! - fix: sanitize KATEX blocksResolves CVE-2025-54881 reported by @fourcube
#6804
895f9d4Thanks @omkarht! - chore: Update packet diagram to use new class-based database structurev11.9.0Compare Source
Minor Changes
5acbd7eThanks @sidharthv96! - feat: AddgetRegisteredDiagramsMetadatatomermaid, which returns all the registered diagram IDs in mermaidPatch Changes
#6738
d90634bThanks @shubham-mermaid! - chore: Updated TreeMapDB to use class based approach#6510
7a38eb7Thanks @sidharthv96! - chore: Move packet diagram out of beta#6747
3e3ae08Thanks @darshanr0107! - fix: adjust sequence diagram title positioning to prevent overlap with top border in Safari#6751
d3e2be3Thanks @darshanr0107! - chore: Update MindmapDB to use class based approach#6715
637680dThanks @Syn3ugar! - fix(timeline): fix loadingleftMarginfrom configThe
timeline.leftMarginconfig value should now correctly control the size of the left margin, instead of being ignored.Updated dependencies [
7a38eb7]:Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.