Webpack 4.29.4 and 4.29.3 are closely related versions of the popular JavaScript module bundler. While both versions share the same core functionality and description – packing CommonJs/AMD modules for the browser, splitting code into bundles for on-demand loading and supporting loaders for various file types – subtle yet important differences exist, primarily within their dependency updates.
The most notable change is the updated @webassemblyjs dependencies. Version 4.29.4 upgrades @webassemblyjs/ast, @webassemblyjs/wasm-edit, and @webassemblyjs/wasm-parser, and @webassemblyjs/helper-module-context to version "1.8.2" from "1.7.11" in 4.29.3. These updates likely include bug fixes, performance improvements, or new features related to WebAssembly support within Webpack.
The differences are minimal, therefore the upgrade should not be an issue and should not break existing features.
For developers, this means that upgrading to 4.29.4 will provide the latest WebAssembly handling capabilities within Webpack. If your project utilizes WebAssembly modules, this upgrade is recommended to benefit from the latest fixes and enhancements. Developers who are not using WebAssembly in their projects may also benefit from the upgrade, due to the improvements with the dependencies. The changes are minimal, meaning that the upgrade will be smooth and without backward compatibility issues.
All the vulnerabilities related to the version 4.29.4 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.