@babel/cli version 7.10.4 introduces subtle but important updates compared to version 7.10.3, primarily affecting the development dependencies that streamline the build and test process. While both versions share a core set of dependencies for command-line operation, including glob for file matching, slash for path normalization, and lodash for utility functions, the key change lies in the versions of @babel/core and @babel/helper-fixtures within the devDependencies. Version 7.10.4 upgrades @babel/core to 7.10.4 and @babel/helper-fixtures to 7.10.4, whereas version 7.10.3 uses @babel/core 7.10.3 and @babel/helper-fixtures 7.10.1.
These upgrades are particularly relevant for developers actively contributing to the Babel project or those relying on the latest functionalities and bug fixes within the core Babel transformation engine and testing utilities. Although the direct impact on end-users might be minimal, these updates ensure compatibility and improved performance when working with the latest Babel features and when contributing to the babel project.. The @babel/cli package itself, responsible for providing the command-line interface to Babel, remains largely the same in terms of its core functionality and dependencies such as chokidar for file watching, commander for argument parsing and source-map, convert-source-map to handle source map generation . The file size and count within the distribution package are identical, suggesting no significant changes to the packaged files themselves. For most developers using Babel for code transformation, updating to 7.10.4 guarantees that they are using a version of babel-cli that is in sync with Babel's core developments which is very important when using the most recent javascript and typescript features.
All the vulnerabilities related to the version 7.10.4 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.