Webpack version 4.29.2 represents a minor update over its predecessor, 4.29.1, containing a few key changes that could impact developers. Dependency updates are the most prominent differences between these two releases. In the dependencies, version 4.29.2 upgrades schema-utils from version 0.4.4 to 1.0.0. In devDependencies, version 4.29.2 upgrades jest from version 24.0.0-alpha.1 to 24.1.0, css-loader from version 0.28.3 to ^2.1.0, raw-loader from version ~0.5.0 to ^1.0.0, url-loader from version ^0.6.2 to ^1.1.2, @types/node from version ^9.6.4 to ^10.12.21, file-loader from version ^1.1.6 to ^3.0.1, eslint-plugin-jest from version ^21.26.2 to ^22.2.2, eslint-config-prettier from version ^3.1.0 to ^4.0.0 and webpack-dev-middleware from version ^1.9.0 to ^3.5.1. Downgraded dependencies: less from version ^2.5.1 to ^3.9.0, react from version ^15.2.1 to ^16.8.0, react-dom from version ^15.2.1 to ^16.8.0, coffeescript from version ^1.10.0 to ^2.3.2, style-loader from version ^0.19.1 to ^0.23.1, vm-browserify from version ~0.0.0 to ~1.1.0, worker-loader from version ^1.1.1 to ^2.0.0 and codacy-coverage from version ^2.0.1 is no longer present on version 4.29.2. While seemingly minor, these dependency bumps can bring performance improvements, bug fixes, and new features to the respective tools that Webpack relies on. Developers should carefully examine these updated dependencies to ensure compatibility with their projects and leverage any potential benefits they offer.
All the vulnerabilities related to the version 4.29.2 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.