-
-
Notifications
You must be signed in to change notification settings - Fork 12
fix(deps): update dependency mermaid to v9 [security] #671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
3547410 to
8b583e0
Compare
8b583e0 to
6248493
Compare
6248493 to
f5ab9e5
Compare
f5ab9e5 to
df6a0b5
Compare
df6a0b5 to
c903d7c
Compare
c903d7c to
aa051c9
Compare
aa051c9 to
1e9b835
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
1e9b835 to
122d544
Compare
122d544 to
231bd87
Compare
This PR contains the following updates:
8.5.0→9.1.2GitHub Vulnerability Alerts
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-2021-35513
Mermaid before 8.11.0 allows XSS when the antiscript feature is used.
CVE-2022-31108
An attacker is able to inject arbitrary
CSSinto the generated graph allowing them to change the styling of elements outside of the generated graph, and potentially exfiltrate sensitive information by using specially craftedCSSselectors.The following example shows how an attacker can exfiltrate the contents of an input field by bruteforcing the
valueattribute one character at a time. Whenever there is an actual match, anhttprequest 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
textColortheme variable, an attacker can inject arbitraryCSSrules into the document. In the following snippet we can see thatgetStylesdoes not sanitize any of the theme variables leaving the door open forCSSinjection.Snippet from src/styles.js:
For example, if we set
textColorto"green;} #target { background-color: crimson }"the resultingCSSwill contain a new selector#targetthat will apply acrimsonbackground color to an arbitrary element.In the proof of concept above we used the
textColorvariable 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 Disclosurevia 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.2Compare 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.1Compare Source
Release Notes
🎉 Thanks to all contributors helping with this release! 🎉
v9.1.0Compare 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.1Compare Source
Release Notes
🐛 Bug Fixes
🎉 Thanks to all contributors helping with this release! 🎉
v9.0.0Compare 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-materialto the integrations (#2780) @chrimahoREADME.mdanddocs/README.mdare in sync (#2755) @kuanyi-nglivebookandexdocsintegrations (#2728) @RudolfManDependency updates
🎉 Thanks to all contributors helping with this release! 🎉
v8.14.0Compare Source
Release Notes
Main feature
Documentation updates
Dependecy updates
🎉 Thanks to all contributors helping with this release! 🎉
v8.13.10Compare Source
Release Notes
🎉 Thanks to all contributors helping with this release! 🎉
v8.13.9Compare Source
Release Notes
Changes to the functionality
Documentation changes
Dependency updates