fix(deps): update dependency mermaid to v9 [security] #671
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:
8.5.0
->9.1.2
GitHub Vulnerability Alerts
CVE-2021-35513
Mermaid before 8.11.0 allows XSS when the antiscript feature is used.
CVE-2021-43861
Impact
Malicious diagrams can contain javascript code that can be run at diagram readers machines.
Patches
The users should upgrade to version 8.13.8
Workarounds
You need to upgrade in order to avoid this issue.
CVE-2022-31108
An attacker is able to inject arbitrary
CSS
into the generated graph allowing them to change the styling of elements outside of the generated graph, and potentially exfiltrate sensitive information by using specially craftedCSS
selectors.The following example shows how an attacker can exfiltrate the contents of an input field by bruteforcing the
value
attribute one character at a time. Whenever there is an actual match, anhttp
request will be made by the browser in order to "load" a background image that will let an attacker know what's the value of the character.Patches
Has the problem been patched? What versions should users upgrade to?
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
References
Are there any links users can visit to find out more?
For more information
If you have any questions or comments about this advisory:
Product
mermaid.js
Tested Version
v9.1.1
Details
Issue 1: Multiple CSS Injection (
GHSL-2022-036
)By supplying a carefully crafted
textColor
theme variable, an attacker can inject arbitraryCSS
rules into the document. In the following snippet we can see thatgetStyles
does not sanitize any of the theme variables leaving the door open forCSS
injection.Snippet from src/styles.js:
For example, if we set
textColor
to"green;} #target { background-color: crimson }"
the resultingCSS
will contain a new selector#target
that will apply acrimson
background color to an arbitrary element.In the proof of concept above we used the
textColor
variable to injectCSS
, but there are multiple functions that can potentially be abused to change the style of the document. Some of them are in the following list but we encourage mantainers to look for additional injection points:Impact
This issue may lead to
Information Disclosure
via CSS selectors and functions able to generate HTTP requests. This also allows an attacker to change the document in ways which may lead a user to perform unintended actions, such as clicking on a link, etc.Remediation
Ensure that user input is adequately escaped before embedding it in CSS blocks.
Release Notes
mermaid-js/mermaid (mermaid)
v9.1.2
Compare Source
Release Notes
🚀 Features
Add support for cyclic themeVariable rotation when more than 8 branches (#3049) @ashishjain0512
#3060 support cherry commit in gitgraph (#3115) @ashishjain0512
#3080 Adding rotated commit label functionality (#3113) @ashishjain0512
feat: adding "Critical Region"/"Option" and "Break" blocks to sequence diagram (#3063) @financelurker
[Experimental] Add C4 Diagram. Compatible with C4-PlantUML syntax. (#3038) @pinghe
Bug Fixes & Cleanup
Documentation
Dependecy updates
🎉 Thanks to all contributors helping with this release! 🎉
v9.1.1
Compare Source
Release Notes
🎉 Thanks to all contributors helping with this release! 🎉
v9.1.0
Compare Source
Release Notes
🚀 Features
Accessibility added to the charts (#3008) (#2732) @knsv @gwincr11 @therzka @khiga8 @el-mapache @lindseywild
feat: add hideUnusedParticipants and some cleanup (#2943) @Yash-Singh1
Added default new line in the diagram text before parsing for special… (#2983) @ashishjain0512
Added support to change the position of the main branch (#3010) @ashishjain0512
Sequence autonumbering and Git fix options parsing (#2981) @Zumbala
GitGraph: add support for branch ordering (#3002) @husa
fix mermaidAPI.parse() behavior to match documentation, add tests to ensure behavior matches docs (#3004) @timmaffett
protect config.js from attempting to use invalid theme name (which corrupted mermaid use until reset()) (#2987) @timmaffett
Handling flowchart link style for html labels using legacy renderer #2951
Documentation
Dependecy updates
🎉 Thanks to all contributors helping with this release! 🎉
v9.0.1
Compare Source
Release Notes
🐛 Bug Fixes
🎉 Thanks to all contributors helping with this release! 🎉
v9.0.0
Compare Source
Release Notes
Main feature
Moving the gitGraph from experimental alpha status to a fully supported diagram type which handles theming and directives. The grammar has changed slightly from the alpha version, and no longer supports reset operations and some internal fast-forwarding has been removed for simplicity. Some few GitGraphs based on the alpha version might break with the update. This is the reason for the major version number update.
We now support:
Other changes:
Documentation updates
mkdocs-material
to the integrations (#2780) @chrimahoREADME.md
anddocs/README.md
are in sync (#2755) @kuanyi-nglivebook
andexdocs
integrations (#2728) @RudolfManDependency updates
🎉 Thanks to all contributors helping with this release! 🎉
v8.14.0
Compare Source
Release Notes
Main feature
Documentation updates
Dependecy updates
🎉 Thanks to all contributors helping with this release! 🎉
v8.13.10
Compare Source
Release Notes
🎉 Thanks to all contributors helping with this release! 🎉
v8.13.9
Compare Source
Release Notes
Changes to the functionality
Documentation changes
Dependency updates
🎉 Thanks to all contributors helping with this release! 🎉
v8.13.8
Compare Source
Release Notes
Fix for vulnerability with links from actors in sequence diagrams
Fix for insuffiucient url sanitization (#2596)
Add Notion to integrations.md (#2593) @kale-stew
Update TiddlyWiki integrations (#2584) @jasonmhoule
Bump @commitlint/cli from 15.0.0 to 16.0.0 (#2590) @dependabot
Bump @commitlint/config-conventional from 15.0.0 to 16.0.0 (#2591) @dependabot
Bump cypress from 9.1.1 to 9.2.0 (#2586) @dependabot
Bump eslint-plugin-jsdoc from 37.3.0 to 37.4.0 (#2589) @dependabot
Bump lint-staged from 12.1.3 to 12.1.4 (#2587) @dependabot
Bump webpack-dev-server from 4.6.0 to 4.7.1 (#2588) @dependabot
Bump @babel/core from 7.16.0 to 7.16.5 (#2575) @dependabot
Bump @babel/eslint-parser from 7.16.3 to 7.16.5 (#2579) @dependabot
Bump @babel/preset-env from 7.16.4 to 7.16.5 (#2576) @dependabot
Bump @babel/register from 7.16.0 to 7.16.5 (#2569) @dependabot
Bump babel-jest from 27.4.4 to 27.4.5 (#2571) @dependabot
Bump concurrently from 6.4.0 to 6.5.1 (#2570) @dependabot
Bump eslint from 8.4.1 to 8.5.0 (#2572) @dependabot
Bump eslint-plugin-jsdoc from 37.2.0 to 37.3.0 (#2573) @dependabot
Bump jest from 27.4.4 to 27.4.5 (#2578) @dependabot
Bump lint-staged from 12.1.2 to 12.1.3 (#2577) @dependabot
Bump terser-webpack-plugin from 5.2.5 to 5.3.0 (#2574) @dependabot
🎉 Thanks to all contributors helping with this release! 🎉
v8.13.7
[Compare Source](https://togithub.com/mermaid-js/mermaid/compar