Webpack 4.27.0 introduces subtle improvements over its predecessor, version 4.26.1. Examining the package metadata reveals a few key distinctions. The dist object indicates that 4.27.0 possesses a slightly larger unpacked size (1,374,496 bytes versus 1,370,680 bytes) and a larger fileCount (346 versus 345), suggesting minor additions or modifications to the core library or associated resources. While the dependencies and devDependencies remain identical, this size difference might reflect internal optimizations or bug fixes.
Developers considering upgrading should note the release dates: version 4.27.0 was published on December 4th, 2018, roughly a week and a half after version 4.26.1's release on November 25th, 2018. This short interval implies that 4.27.0 likely addresses issues discovered in 4.26.1, potentially including security patches or performance enhancements. While a simple update is generally recommended, developers should consult the official webpack changelog or release notes (if available) for a comprehensive understanding of the specific changes to ensure compatibility and determine if the update resolves any known issues in their projects. Analyzing the Git commit history between these two versions offers deeper insights into the precise modifications. If no issues are found then there are no impediments to use the newest version of the package and update the old one.
All the vulnerabilities related to the version 4.27.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.