diagrams@0.11.0
Vulnerabilities |
42 via 43 paths |
---|---|
Dependencies |
276 |
Source |
npm |
Find, fix and prevent vulnerabilities in your code.
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Arbitrary Code Execution due to Node being enabled in a webview because the default values of nodeIntegration
and webviewTag
were set to true
when they where undefined by a user. The fix allows users to prevent Node and webview being enabled, when undefined, by setting the default values of nodeIntegration
and webviewTag
to false
.
Remediation
Upgrade electron
to version 5.0.0-beta.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Heap Overflow. A Heap buffer overflow exists in the media component of Google Chrome, which also affects chromium.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Heap-based Buffer Overflow in Freetype.
Remediation
Upgrade electron
to version 8.5.3, 9.3.3, 10.1.5 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Heap-based Buffer Overflow. A heap buffer overflow flaw was found in the UI component of the Chromium browser.
Remediation
Upgrade electron
to version 9.4.0, 10.2.0 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Improper Access Control. An insufficient policy enforcement flaw was found in the networking component of chromium.
Remediation
Upgrade electron
to version 9.4.0, 10.1.7 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Improper Access Control. It has an inappropriate implementation in V8.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Improper Input Validation. An insufficient data validation flaw was found in the WASM component of the Chromium browser.
Remediation
Upgrade electron
to version 9.4.0, 10.1.7 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Improper Validation. The value of a node was accessed without prior HasValue
check. With WebAssembly this node is not guaranteed to be a value.
Remediation
Upgrade electron
to version 10.1.6, 9.4.4 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Insufficient Validation in V8.
Remediation
Upgrade electron
to version 9.4.0, 10.2.0 or higher.
References
high severity
new
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Insufficient Validation via an unknown issue in chromium
.
Remediation
Upgrade electron
to version 9.4.2, 10.3.1, 11.2.2 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Out-of-bounds Read. An unknown vunerability exists in Chrome which affects electron
.
Remediation
Upgrade electron
to version 9.4.1, 10.3.2 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Out-of-bounds Read. The input to sctp_load_addresses_from_init
is verified by calling sctp_arethere_unrecognized_parameters
, however there is a difference in how these functions handle parameter bounds. The function sctp_arethere_unrecognized_parameters
does not process a parameter that is partially outside of the limit of the chunk, meanwhile, sctp_load_addresses_from_init
will continue processing until a parameter that is entirely outside of the chunk occurs.
This means that the last parameter of a chunk is not always verified, which can lead to parameters with very short plen
values being processed by sctp_load_addresses_from_init
. This can lead to out-of-bounds reads whenever the plen
is subtracted from the header len
.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.0 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Privilege Escalation. This is a context isolation bypass, meaning that code running in the main world context in the renderer can reach into the isolated Electron context and perform privileged actions.
##Note:
Only apps using contextIsolation
are affected.
Remediation
Upgrade electron
to version 7.2.4, 8.2.4 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Privilege Escalation. This is a context isolation bypass, meaning that code running in the main world context in the renderer can reach into the isolated Electron context and perform privileged actions.
##Note:
Only apps using both contextIsolation
and contextBridge
are affected.
Remediation
Upgrade electron
to version 7.2.4, 8.2.4 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Privilege Escalation. This is a context isolation bypass, meaning that code running in the main world context in the renderer can reach into the isolated Electron context and perform privileged actions.
##Note:
Only apps using contextIsolation
are affected.
Remediation
Upgrade electron
to version 6.1.11, 7.2.4, 8.2.4 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Site Isolation Bypass. parent_execution_origin_
is provided from parent's RenderFrameHostImpl::last_committed_origin_
that is set during navigation commit. Worker creation IPC from the renderer to browser could race with navigation commit, and could see the wrong last committed origin.
Remediation
Upgrade electron
to version 7.2.2, 8.2.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Type Confusion in V8.
Remediation
Upgrade electron
to version 7.3.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free via the site isolation.
Remediation
Upgrade electron
to version 8.5.4, 9.3.5, 10.1.6 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. A use after free flaw was found in the PPAPI component of the Chromium browser.
Remediation
Upgrade electron
to version 9.4.0, 10.2.0 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. Since JavaScript may detach the underlying buffers, they need to be checked to ensure they're still valid before using them for decoding.
Remediation
Upgrade electron
to version 10.2.0, 9.4.4 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. An unknown vunerability exists in Chrome.
Remediation
Upgrade electron
to version 9.4.1, 10.3.2 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free in Media.
Remediation
Upgrade electron
to version 11.2.1, 9.4.4 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. It hands sub-queries with both a correlated WHERE
clause and a HAVING 0
clause where the parent query is itself an aggregate.
Remediation
Upgrade electron
to version 11.2.1, 9.4.4 or higher.
References
high severity
new
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free via handling of cookies.
Remediation
Upgrade electron
to version 9.4.2, 10.3.1, 11.2.2 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. Multiple user after free vulnerabilities exists in the WebAudio component of chromium.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. It allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free via the audio component. It allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free via the audio component.
Remediation
Upgrade electron
to version 8.2.1, 7.2.2 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. FileChooserImpl
can outlive ListenerProxy
leading to a crash.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.0 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. Initialize()
could potentially run twice in MojoVideoEncodeAcceleratorService
.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.1 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. It allows a remote attacker to potentially exploit heap corruption via a crafted HTML page.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.0 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. An AudioContext
is considered to have activity if it's not closed. Previously, suspended contexts were considered has having no activity, but that's not quite true since the context can be resumed at any time after. This would allow contexts to be collected prematurely even though the context was resumed. This causes the audio thread to access objects that are possibly deleted.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.0.0-beta.6 or higher.
References
high severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free in WebRTC.
Remediation
Upgrade electron
to version 8.3.1 or higher.
References
medium severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Arbitrary File Read. It allows arbitrary local file read by defining unsafe window options on a child window opened via window.open
.
Remediation
Upgrade electron
to version 7.2.4, 8.2.4 or higher.
References
medium severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Buffer Underflow. Since there may be multiple instance of DWriteFontProxyImpl
instantiated for multiple RenderProcessHosts
, and DWriteFontProxyImpl::GetUniqueNameLookupTable
may access DWriteFontLookupTableBuilder::QueueShareMemoryRegionWhenReady
from separate threads, there may be race conditions around the pending_callbacks_
member of DWriteFontLookupTableBuilder
.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.0 or higher.
References
medium severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Improper Input Validation via the File System API.
Remediation
Upgrade electron
to version 11.2.1, 9.4.4 or higher.
References
medium severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Information Exposure. When a BigInt
is right-shifted the backing store is not properly cleared, allowing uninitialized memory to be read.
Remediation
Upgrade electron
to version 9.4.1, 10.3.2 or higher.
References
medium severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Information Exposure. IPC messages sent from the main process to a subframe in the renderer process, through webContents.sendToFrame
, event.reply
or when using the remote
module, can in some cases be delivered to the wrong frame.
Remediation
Upgrade electron
to version 9.4.0, 10.2.0, 11.1.0, 12.0.0-beta.9 or higher.
References
medium severity
new
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free via the Blink component in chromium
.
Remediation
Upgrade electron
to version 9.4.2, 10.3.1, 11.2.2 or higher.
References
medium severity
- Vulnerable module: electron
- Introduced through: electron@3.1.13
Detailed paths
-
Introduced through: diagrams@0.11.0 › electron@3.1.13Remediation: Upgrade to diagrams@0.27.0.
Overview
electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Affected versions of this package are vulnerable to Use After Free. The rendering_orphan_handlers_
and deletable_orphan_handlers_
handlers can hold references to the context after BaseAudioContext
is destroyed.
Remediation
Upgrade electron
to version 6.1.10, 7.2.2, 8.2.1 or higher.
References
medium severity
- Vulnerable module: glob-parent
- Introduced through: chokidar@1.7.0
Detailed paths
-
Introduced through: diagrams@0.11.0 › chokidar@1.7.0 › glob-parent@2.0.0
-
Introduced through: diagrams@0.11.0 › chokidar@1.7.0 › anymatch@1.3.2 › micromatch@2.3.11 › parse-glob@3.0.4 › glob-base@0.3.0 › glob-parent@2.0.0
Overview
glob-parent is a package that helps extracting the non-magic parent path from a glob string.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). The enclosure
regex used to check for strings ending in enclosure containing path separator.
PoC by Yeting Li
var globParent = require("glob-parent")
function build_attack(n) {
var ret = "{"
for (var i = 0; i < n; i++) {
ret += "/"
}
return ret;
}
globParent(build_attack(5000));
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.
The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.
Let’s take the following regular expression as an example:
regex = /A(B|C+)+D/
This regular expression accomplishes the following:
A
The string must start with the letter 'A'(B|C+)+
The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the+
matches one or more times). The+
at the end of this section states that we can look for one or more matches of this section.D
Finally, we ensure this section of the string ends with a 'D'
The expression would match inputs such as ABBD
, ABCCCCD
, ABCBCCCD
and ACCCCCD
It most cases, it doesn't take very long for a regex engine to find a match:
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total
The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.
Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.
Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:
- CCC
- CC+C
- C+CC
- C+C+C.
The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.
From there, the number of steps the engine must use to validate a string just continues to grow.
String | Number of C's | Number of steps |
---|---|---|
ACCCX | 3 | 38 |
ACCCCX | 4 | 71 |
ACCCCCX | 5 | 136 |
ACCCCCCCCCCCCCCX | 14 | 65,553 |
By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.
Remediation
There is no fixed version for glob-parent
.
References
low severity
- Vulnerable module: braces
- Introduced through: chokidar@1.7.0
Detailed paths
-
Introduced through: diagrams@0.11.0 › chokidar@1.7.0 › anymatch@1.3.2 › micromatch@2.3.11 › braces@1.8.5Remediation: Upgrade to diagrams@0.27.0.
Overview
braces is a Bash-like brace expansion, implemented in JavaScript.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). It used a regular expression (^\{(,+(?:(\{,+\})*),*|,*(?:(\{,+\})*),+)\}
) in order to detects empty braces. This can cause an impact of about 10 seconds matching time for data 50K characters long.
Disclosure Timeline
- Feb 15th, 2018 - Initial Disclosure to package owner
- Feb 16th, 2018 - Initial Response from package owner
- Feb 18th, 2018 - Fix issued
- Feb 19th, 2018 - Vulnerability published
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.
The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.
Let’s take the following regular expression as an example:
regex = /A(B|C+)+D/
This regular expression accomplishes the following:
A
The string must start with the letter 'A'(B|C+)+
The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the+
matches one or more times). The+
at the end of this section states that we can look for one or more matches of this section.D
Finally, we ensure this section of the string ends with a 'D'
The expression would match inputs such as ABBD
, ABCCCCD
, ABCBCCCD
and ACCCCCD
It most cases, it doesn't take very long for a regex engine to find a match:
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total
The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.
Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.
Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:
- CCC
- CC+C
- C+CC
- C+C+C.
The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.
From there, the number of steps the engine must use to validate a string just continues to grow.
String | Number of C's | Number of steps |
---|---|---|
ACCCX | 3 | 38 |
ACCCCX | 4 | 71 |
ACCCCCX | 5 | 136 |
ACCCCCCCCCCCCCCX | 14 | 65,553 |
By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.
Remediation
Upgrade braces
to version 2.3.1 or higher.