Brace expansion is a utility for expanding brace expressions, commonly found in shell scripting (like sh or bash), offering a way to generate multiple strings from a single pattern. Both versions 1.1.0 and 1.1.1 provide this functionality, enabling developers to create lists of strings by using patterns with curly braces containing comma-separated values or ranges. The package's core dependencies remain consistent across both versions, relying on concat-map (version 0.0.1) for efficient array concatenation and balanced-match (version ^0.2.0) for correctly identifying and extracting balanced curly braces. Similarly, both leverage tape (version ^3.0.3) for testing, ensuring code reliability. The license for both remains MIT, offering broad usage permissions.
The key difference lies in their release dates. Version 1.1.0 was released on December 16, 2014, while version 1.1.1 arrived significantly later, on September 27, 2015. While the package manifest doesn't explicitly detail functional changes between versions, the ten-month gap strongly suggests bug fixes, performance improvements, or other minor enhancements were incorporated into version 1.1.1. Developers using brace expansion should prefer the newer 1.1.1 release as it likely incorporates these improvements and ensures the most stable and up-to-date experience. Both versions are available via npm.
All the vulnerabilities related to the version 1.1.1 of the package
ReDoS in brace-expansion
Affected versions of brace-expansion
are vulnerable to a regular expression denial of service condition.
var expand = require('brace-expansion');
expand('{,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n}');
Update to version 1.1.7 or later.
brace-expansion Regular Expression Denial of Service vulnerability
A vulnerability was found in juliangruber brace-expansion up to 1.1.11/2.0.1/3.0.0/4.0.0. It has been rated as problematic. Affected by this issue is the function expand of the file index.js. The manipulation leads to inefficient regular expression complexity. The attack may be launched remotely. The complexity of an attack is rather high. The exploitation is known to be difficult. The exploit has been disclosed to the public and may be used. Upgrading to version 1.1.12, 2.0.2, 3.0.1 and 4.0.1 is able to address this issue. The name of the patch is a5b98a4f30d7813266b221435e1eaaf25a1b0ac5
. It is recommended to upgrade the affected component.