Webpack version 4.24.0 introduces subtle enhancements over its predecessor, 4.23.1, offering developers refinements in their module bundling process. Examining the dependency updates reveals minor version bumps in several key packages. Most notably, @webassemblyjs/ast, @webassemblyjs/wasm-edit, @webassemblyjs/wasm-parser, and @webassemblyjs/helper-module-context all transition from version 1.7.10 to 1.7.11, suggesting potential improvements or fixes within the WebAssembly tooling. The eslint package sees a significant update from version 5.2.0 to 5.8.0, which may introduce new linting rules or enhancements for code quality.
Furthermore, the husky dev dependency advances from version 1.0.0-rc.6 to 1.1.3, and the lint-staged package jumps from 7.2.0 to 8.0.4 potentially streamlining pre-commit or pre-push tasks. eslint-plugin-jest progresses from version 21.18.0 to 21.26.2, and eslint-plugin-node evolves from 7.0.1 to 8.0.0, possibly expanding Jest and Node.js specific linting capabilities. eslint-config-prettier graduates from 2.9.0 to 3.1.0, accompanied by an upgrade of the eslint-plugin-prettier package from 2.6.2 to 3.0.0, improving code formatting integration. These updates collectively indicate a continued focus on stability, security, and optimized developer workflows within the webpack ecosystem. Developers should review the changelogs of these updated dependencies for detailed insights.
All the vulnerabilities related to the version 4.24.0 of the package
Regular Expression Denial of Service (ReDoS) in micromatch
The NPM package micromatch
prior to version 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in micromatch.braces()
in index.js
because the pattern .*
will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persisted prior to https://github.com/micromatch/micromatch/pull/266. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching.
Uncontrolled resource consumption in braces
The NPM package braces
fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In lib/parse.js,
if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.
Regular Expression Denial of Service (ReDoS)
npm ssri
5.2.2-6.0.1 and 7.0.0-8.0.0, processes SRIs using a regular expression which is vulnerable to a denial of service. Malicious SRIs could take an extremely long time to process, leading to denial of service. This issue only affects consumers using the strict option.
Cross-Site Scripting in serialize-javascript
Versions of serialize-javascript
prior to 2.1.1 are vulnerable to Cross-Site Scripting (XSS). The package fails to sanitize serialized regular expressions. This vulnerability does not affect Node.js applications.
Upgrade to version 2.1.1 or later.
Insecure serialization leading to RCE in serialize-javascript
serialize-javascript prior to 3.1.0 allows remote attackers to inject arbitrary code via the function "deleteFunctions" within "index.js".
An object such as {"foo": /1"/, "bar": "a\"@__R-<UID>-0__@"}
was serialized as {"foo": /1"/, "bar": "a\/1"/}
, which allows an attacker to escape the bar
key. This requires the attacker to control the values of both foo
and bar
and guess the value of <UID>
. The UID has a keyspace of approximately 4 billion making it a realistic network attack.