Webpack version 0.3.2 introduces several new features and dependency updates compared to version 0.3.1, offering developers expanded capabilities for bundling JavaScript modules. The primary enhancement lies in the addition of css-loader, style-loader, and script-loader as dependencies and optional dependencies. These additions significantly streamline the process of incorporating CSS and external JavaScript files into webpack bundles. The css-loader enables developers to import CSS files as modules, allowing for greater control and modularity in styling. The style-loader then injects these styles directly into the DOM, simplifying the application of styles to web pages. The inclusion of script-loader facilitates the loading of external JavaScript files much easier.
These features offer a more complete solution for managing assets, enhancing the developer experience by reducing the need for manual configuration and external tools to manage css and javascript dependencies. These improvements would be beneficial for projects looking to leverage webpack for comprehensive asset management, especially in scenarios where modular CSS and easy import of external javascript file are desired. The update provides a more streamlined and integrated approach to web development. While both versions maintain core functionalities like CommonJS module packing, on-demand bundle loading, and dependencies like esprima, sprintf, optimist, and uglify-js, version 0.3.2 provides a richer toolset for front-end development.
All the vulnerabilities related to the version 0.3.2 of the package
Incorrect Handling of Non-Boolean Comparisons During Minification in uglify-js
Versions of uglify-js
prior to 2.4.24 are affected by a vulnerability which may cause crafted JavaScript to have altered functionality after minification.
Upgrade UglifyJS to version >= 2.4.24.
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.
Regular Expression Denial of Service in clean-css
Version of clean-css
prior to 4.1.11 are vulnerable to Regular Expression Denial of Service (ReDoS). Untrusted input may cause catastrophic backtracking while matching regular expressions. This can cause the application to be unresponsive leading to Denial of Service.
Upgrade to version 4.1.11 or higher.
Sandbox Bypass Leading to Arbitrary Code Execution in constantinople
Versions of constantinople
prior to 3.1.1 are vulnerable to a sandbox bypass which can lead to arbitrary code execution.
Update to version 3.1.1 or later.