Webpack versions 4.29.2 and 4.29.3 are very similar, representing a minor update within the 4.x series of this popular JavaScript module bundler. Examining the package data, the core functionality and dependencies remain largely consistent. Both versions share the same description, outlining Webpack's primary purpose: packaging CommonJs/AMD modules for browser deployment, enabling code splitting for on-demand loading, and supporting loaders for various file types like JSON, JSX, and CSS.
Notable for developers is the almost identical dependency list. Both versions rely on the same range of dependencies, including ajv for JSON schema validation, acorn for JavaScript parsing, terser-webpack-plugin for code minification, and many more tools essential for modern web development workflows. This highlights the stability of Webpack's core architecture in this point release.
The key differences lie in the "dist" section. While the number of files included in both versions is the same (346), the unpacked size of version 4.29.3 is slightly larger (1,380,055 bytes) compared to 4.29.2 (1,379,223 bytes), suggesting minor code adjustments or optimizations. The release date also distinguishes the two, with version 4.29.3 being released on February 7th, 2019, following the February 6th release of version 4.29.2, indicating a quick follow-up release to address bug fixes or small enhancements. Developers migrating from 4.29.2 to 4.29.3 can expect a seamless transition with minimal impact on their existing configurations. Focusing on these granular updates shows how webpack team manages the tool.
All the vulnerabilities related to the version 4.29.3 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.