Webpack 4.32.1 is a minor patch release following version 4.32.0. Both are powerful module bundlers primarily used for JavaScript applications, transforming and packaging code and assets for optimal browser delivery. While the core functionality remains consistent, examining the differences is crucial for developers considering an upgrade.
Looking at the provided data, the most apparent change lies in the dist section. Webpack 4.32.1 has a slightly larger fileCount (348 vs. 347) and unpackedSize (1388622 vs. 1387757) compared to 4.32.0. This suggests that bug fixes and very minor improvements were introduced, affecting the overall size but not drastically changing the API or functionality. Notably, dependencies and devDependencies appear identical between the two versions. The release date reflects a two-day difference, confirming the nature of a quick patch.
For developers, upgrading from 4.32.0 to 4.32.1 should be a relatively safe and seamless process. The patch likely addresses edge cases or minor bugs discovered after the initial 4.32.0 release. Testing is always recommended, although the similarities minimize the risk of breaking changes. Developers should prioritize upgrading to benefit from the fixed issues that contribute to a stronger and more reliable toolchain. For optimal build speed, performance, and compatibility with the latest JavaScript features, consider keeping your Webpack version up-to-date.
All the vulnerabilities related to the version 4.32.1 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.