Webpack-cli experienced a minor version bump from 3.2.2 to 3.2.3, both versions presenting themselves as command-line interfaces intended to streamline interactions with webpack and related tools. Examining the changes reveals a subtle yet potentially crucial difference in the dependencies. Version 3.2.2 includes "webpack-cli-scripts": "^1.0.2" as a dependency, which is absent in version 3.2.3. This suggests a possible adjustment in how webpack-cli handles its internal scripting or build processes. Developers upgrading from 3.2.2 should pay close attention to potential impacts on custom scripts or configurations expecting this dependency.
Both versions share a common set of dependencies for core functionalities such as argument parsing (yargs), colored terminal output (chalk), and module resolution (enhanced-resolve). The development dependencies, used for testing and building the package itself, are virtually identical, indicating a consistent development environment between the releases. These include popular tools like Jest for testing, ESLint for code linting, and TypeScript for language support. The peer dependency on webpack itself remains consistent at "4.x.x," emphasizing compatibility with webpack version 4.x. A very small difference in "unpackedSize" may indicate minimal changes, bugfixes or typo changes.
For developers, this update highlights the importance of carefully reviewing dependency changes, even in minor version bumps. While the core functionality of webpack-cli likely remains consistent, the removal of a specific dependency like webpack-cli-scripts warrants investigation to ensure a smooth transition and prevent unexpected behavior. The release dates indicate a rapid succession, suggesting the change was important enough to require a release.
All the vulnerabilities related to the version 3.2.3 of the package
yargs-parser Vulnerable to Prototype Pollution
Affected versions of yargs-parser
are vulnerable to prototype pollution. Arguments are not properly sanitized, allowing an attacker to modify the prototype of Object
, causing the addition or modification of an existing property that will exist on all objects.
Parsing the argument --foo.__proto__.bar baz'
adds a bar
property with value baz
to all objects. This is only exploitable if attackers have control over the arguments being passed to yargs-parser
.
Upgrade to versions 13.1.2, 15.0.1, 18.1.1 or later.
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.