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:
3.2.0
->3.2.2
2.2.0
->2.6.9
3.9.0
->16.5.4
9.18.1
->10.4.1
0.1.2
->0.4.4
7.2.2
->16.5.0
3.10.1
->4.17.21
9.0.1
->9.1.2
0.0.8
->1.2.6
1.0.2
->2.0.1
5.7.1
->5.14.2
GitHub Vulnerability Alerts
CVE-2021-43138
A vulnerability exists in Async through 3.2.1 for 3.x and through 2.6.3 for 2.x (fixed in 3.2.2 and 2.6.4), which could let a malicious user obtain privileges via the
mapValues()
method.CVE-2017-16137
Affected versions of
debug
are vulnerable to regular expression denial of service when untrusted user input is passed into theo
formatter.As it takes 50,000 characters to block the event loop for 2 seconds, this issue is a low severity issue.
Recommendation
Version 2.x.x: Update to version 2.6.9 or later.
Version 3.x.x: Update to version 3.1.0 or later.
CVE-2022-36313
An issue was discovered in the file-type package before 16.5.4 and 17.x before 17.1.3 for Node.js. A malformed MKV file could cause the file type detector to get caught in an infinite loop. This would make the application become unresponsive and could be used to cause a DoS attack.
CVE-2020-26237
Impact
Affected versions of this package are vulnerable to Prototype Pollution. A malicious HTML code block can be crafted that will result in prototype pollution of the base object's prototype during highlighting. If you allow users to insert custom HTML code blocks into your page/app via parsing Markdown code blocks (or similar) and do not filter the language names the user can provide you may be vulnerable.
The pollution should just be harmless data but this can cause problems for applications not expecting these properties to exist and can result in strange behavior or application crashes, i.e. a potential DOS vector.
If your website or application does not render user provided data it should be unaffected.
Patches
Versions 9.18.2 and 10.1.2 and newer include fixes for this vulnerability. If you are using version 7 or 8 you are encouraged to upgrade to a newer release.
Workarounds
Patch your library
Manually patch your library to create null objects for both
languages
andaliases
:Filter out bad data from end users
Filter the language names that users are allowed to inject into your HTML to guarantee they are valid.
References
For more information
If you have any questions or comments about this advisory:
GHSA-7wwv-vh3v-89cq
Impact: Potential ReDOS vulnerabilities (exponential and polynomial RegEx backtracking)
oswasp:
If are you are using Highlight.js to highlight user-provided data you are possibly vulnerable. On the client-side (in a browser or Electron environment) risks could include lengthy freezes or crashes... On the server-side infinite freezes could occur... effectively preventing users from accessing your app or service (ie, Denial of Service).
This is an issue with grammars shipped with the parser (and potentially 3rd party grammars also), not the parser itself. If you are using Highlight.js with any of the following grammars you are vulnerable. If you are using
highlightAuto
to detect the language (and have any of these grammars registered) you are vulnerable. Exponential grammars (C, Perl, JavaScript) are auto-registered when using the common grammar subset/libraryrequire('highlight.js/lib/common')
as of 10.4.0 - see https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.jsAll versions prior to 10.4.1 are vulnerable, including version 9.18.5.
Grammars with exponential backtracking issues:
And of course any aliases of those languages have the same issue. ie:
hpp
is no safer thancpp
.Grammars with polynomial backtracking issues:
And again: any aliases of those languages have the same issue. ie:
ruby
andrb
share the same ruby issues.Patches
Workarounds / Mitigations
References
For more information
If you have any questions or comments about this advisory:
CVE-2020-8175
Uncontrolled resource consumption in
jpeg-js
before 0.4.0 may allow attacker to launch denial of service attacks using specially a crafted JPEG image.CVE-2022-25851
The package jpeg-js before 0.4.4 is vulnerable to Denial of Service (DoS) where a particular piece of input will cause the program to enter an infinite loop and never return.
CVE-2021-20066
JSDom improperly allows the loading of local resources, which allows for local files to be manipulated by a malicious web page when script execution is enabled.
CVE-2018-3721
Versions of
lodash
before 4.17.5 are vulnerable to prototype pollution.The vulnerable functions are 'defaultsDeep', 'merge', and 'mergeWith' which allow a malicious user to modify the prototype of
Object
via__proto__
causing the addition or modification of an existing property that will exist on all objects.Recommendation
Update to version 4.17.5 or later.
CVE-2018-16487
Versions of
lodash
before 4.17.5 are vulnerable to prototype pollution.The vulnerable functions are 'defaultsDeep', 'merge', and 'mergeWith' which allow a malicious user to modify the prototype of
Object
via{constructor: {prototype: {...}}}
causing the addition or modification of an existing property that will exist on all objects.Recommendation
Update to version 4.17.11 or later.
CVE-2019-10744
Versions of
lodash
before 4.17.12 are vulnerable to Prototype Pollution. The functiondefaultsDeep
allows a malicious user to modify the prototype ofObject
via{constructor: {prototype: {...}}}
causing the addition or modification of an existing property that will exist on all objects.Recommendation
Update to version 4.17.12 or later.
CVE-2019-1010266
lodash prior to 4.7.11 is affected by: CWE-400: Uncontrolled Resource Consumption. The impact is: Denial of service. The component is: Date handler. The attack vector is: Attacker provides very long strings, which the library attempts to match using a regular expression. The fixed version is: 4.7.11.
CVE-2020-28500
All versions of package lodash prior to 4.17.21 are vulnerable to Regular Expression Denial of Service (ReDoS) via the toNumber, trim and trimEnd functions. Steps to reproduce (provided by reporter Liyuan Chen): var lo = require('lodash'); function build_blank (n) { var ret = "1" for (var i = 0; i < n; i++) { ret += " " } return ret + "1"; } var s = build_blank(50000) var time0 = Date.now(); lo.trim(s) var time_cost0 = Date.now() - time0; console.log("time_cost0: " + time_cost0) var time1 = Date.now(); lo.toNumber(s) var time_cost1 = Date.now() - time1; console.log("time_cost1: " + time_cost1) var time2 = Date.now(); lo.trimEnd(s) var time_cost2 = Date.now() - time2; console.log("time_cost2: " + time_cost2)
CVE-2021-23337
lodash
versions prior to 4.17.21 are vulnerable to Command Injection via the template function.CVE-2020-8203
Versions of lodash prior to 4.17.19 are vulnerable to Prototype Pollution. The function zipObjectDeep allows a malicious user to modify the prototype of Object if the property identifiers are user-supplied. Being affected by this issue requires zipping objects based on user-provided property arrays.
This vulnerability causes the addition or modification of an existing property that will exist on all objects and may lead to Denial of Service or Code Execution under specific circumstances.
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.
CVE-2020-7598
Affected versions of
minimist
are vulnerable to prototype pollution. Arguments are not properly sanitized, allowing an attacker to modify the prototype ofObject
, causing the addition or modification of an existing property that will exist on all objects.Parsing the argument
--__proto__.y=Polluted
adds ay
property with valuePolluted
to all objects. The argument--__proto__=Polluted
raises and uncaught error and crashes the application.This is exploitable if attackers have control over the arguments being passed to
minimist
.Recommendation
Upgrade to versions 0.2.1, 1.2.3 or later.
CVE-2021-44906
Minimist <=1.2.5 is vulnerable to Prototype Pollution via file index.js, function setKey() (lines 69-95).
CVE-2021-3803
nth-check is vulnerable to Inefficient Regular Expression Complexity
CVE-2022-25858
The package terser before 4.8.1, from 5.0.0 and before 5.14.2 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure usage of regular expressions.
Configuration
📅 Schedule: 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.