@babel/cli, a crucial tool for developers utilizing Babel to transpile JavaScript, saw a release of version 7.6.0 following version 7.5.5. Both versions share core functionality as command-line interfaces for Babel, offering similar descriptions and a consistent set of dependencies like glob, slash, lodash, mkdirp, commander, source-map, output-file-sync, convert-source-map, and fs-readdir-recursive for file system operations and argument parsing.
The primary difference lies in the updated dependencies and devDependencies. Version 7.6.0 upgrades chokidar from version 2.0.4 to 2.1.8, potentially bringing improvements in file watching performance and bug fixes. Correspondingly, the devDependencies, @babel/core and @babel/helper-fixtures are bumped from 7.5.5 to 7.6.0 to stay aligned with the core Babel packages. These upgrades are significant for developers as they ensure compatibility with the latest Babel features and improvements, potentially resolving inconsistencies and improving build times. A key point for users is that both versions maintain the same peer dependency requirement of @babel/core at version 7.0.0 or higher, ensuring broad compatibility with existing Babel configurations. Release dates are about a month and a half apart, with version 7.6.0 arriving in early September 2019. Developers should consider upgrading for stability and access to incremental improvements included in the updated chokidar version.
All the vulnerabilities related to the version 7.6.0 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.