Webpack 4.38.0, released on July 26, 2019, is a minor update to the popular JavaScript module bundler, building upon version 4.37.0 released just days before on July 23, 2019. While the core functionality remains largely the same—packing CommonJs/AMD modules for browsers and providing code-splitting capabilities—developers upgrading should note subtle changes primarily focusing on internal improvements and potential bug fixes. The dependency and devDependency lists appear nearly identical, suggesting that major features additions are not the focus of this incremental release.
Specifically, potential users should look to the official changelog, if available, for details on bug resolutions and performance enhancements introduced. The core value proposition of Webpack remains consistent: enabling efficient management of complex JavaScript applications through modular bundling, on-demand loading, and seamless integration with loaders for pre-processing various file types like JSON, JSX, CSS, and more.
The distribution metadata reveals an increase in file count (from 353 to 354 ) and unpacked size (from 1427751 to 1435004 bytes) in version 4.38.0. This could indicate minor code additions or adjustments to existing files. Developers should carefully review release notes to ascertain whether these changes impact their specific project configurations, addressing optimization or compatibility concerns. The author, Tobias Koppers @sokra, remains the same, ensuring continuity in the project's vision.
All the vulnerabilities related to the version 4.38.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.