@babel/cli is a crucial tool for developers using Babel, enabling them to execute Babel transformations from the command line. Comparing versions 7.10.5 and 7.10.4, the primary differences lie in updated dependency versions, namely lodash. Version 7.10.5 upgrades lodash from version 4.17.13 to 4.17.19, while also bringing associated updates to @babel/core and @babel/helper-fixtures to version 7.10.5.
While seemingly minor, dependency updates like this are essential for incorporating bug fixes, performance improvements, and security patches offered by these underlying packages. Developers should assess if the lodash update specifically resolves any issues they might have encountered.
Both versions share a similar core feature set, relying on packages like glob for file matching, chokidar for file watching, commander for command-line argument parsing, and source-map and convert-source-map for robust debugging. They both depends on peer dependency @babel/core which enables to transform new JavaScript syntax into widely compatible old versions of JavaScript which ensures compatibility across environments. Also the babel developers provide excellent support fixing bugs, developing new features, supporting the community so updating to the latest version makes sure you are up to date with the state of the art JavaScript ecosystem. Using the newest version improves developer quality of life and leverages the newest upgrades.
All the vulnerabilities related to the version 7.10.5 of the package
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.
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.