Update dependency mermaid to v11.10.0 [SECURITY] #11761
Open
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.9.0
->11.10.0
GitHub 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
iconText
values 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, which was released in v11.1.0.
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
iconText
before 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
innerHTML
during calculation of element size, causing XSS.Details
Sequence diagram node labels with KaTeX delimiters are passed through
calculateMathMLDimensions
. This method passes the full label toinnerHTML
which 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
calculateMathMLDimensions
method 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
text
argument for thecalculateMathMLDimensions
method needs to be sanitized before getting passed on toinnerHTML
.Release Notes
mermaid-js/mermaid (mermaid)
v11.10.0
Compare Source
Minor Changes
daf8d8d
Thanks @SpecularAura! - feat: Added support for per link curve styling in flowchart diagram using edge idsPatch Changes
#6857
b9ef683
Thanks @knsv! - feat: Exposing elk configuration forceNodeModelOrder and considerModelOrder to the mermaid configuration#6653
2c0931d
Thanks @darshanr0107! - chore: Remove the "-beta" suffix from the XYChart, Block, Sankey diagrams to reflect their stable status#6683
33e08da
Thanks @darshanr0107! - fix: Position the edge label in state diagram correctly relative to the edge#6693
814b68b
Thanks @darshanr0107! - fix: Apply correct dateFormat in Gantt chart to show only day when specified#6734
fce7cab
Thanks @darshanr0107! - fix: handle exclude dates properly in Gantt charts when using dateFormat: 'YYYY-MM-DD HH:mm:ss'#6733
fc07f0d
Thanks @omkarht! - fix: fixed connection gaps in flowchart for roundedRect, stadium and diamond shape#6876
12e01bd
Thanks @sidharthv96! - fix: sanitize icon labels and icon SVGsResolves CVE-2025-54880 reported by @fourcube
#6801
01aaef3
Thanks @sidharthv96! - fix: Update casing of ID in requirement diagram#6796
c36cd05
Thanks @HashanCP! - fix: Make flowchart elk detector regex match less greedy#6702
8bb29fc
Thanks @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
columns
specifier).#6717
71b04f9
Thanks @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
c99bce6
Thanks @kriss-u! - fix: Add escaped class literal name on namespace#6332
6cc1926
Thanks @ajuckel! - fix: Allow equals sign in sequenceDiagram labels#6651
9da6fb3
Thanks @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
e48b0ba
Thanks @omkarht! - chore: migrate to class-based ArchitectureDB implementation#6838
4d62d59
Thanks @saurabhg772244! - fix: node border style for handdrawn shapes#6739
e9ce8cf
Thanks @kriss-u! - fix: Update flowchart direction TD's behavior to be the same as TB#6833
9258b29
Thanks @darshanr0107! - fix: correctly render non-directional lines for '---' in block diagrams#6855
da90f67
Thanks @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
0133f1c
Thanks @sidharthv96! - fix: sanitize KATEX blocksResolves CVE-2025-54881 reported by @fourcube
#6804
895f9d4
Thanks @omkarht! - chore: Update packet diagram to use new class-based database structureConfiguration
📅 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 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.