ESLint version 0.4.5 represents a minor update over its predecessor, 0.4.4, focusing on refinements and dependency management within this early iteration of the popular JavaScript linter. Both versions share the core functionality of being an Esprima-based pattern checker, aiding developers in maintaining code quality and consistency through customizable linting rules. Key dependencies like glob, chalk, js-yaml, doctrine, estraverse, optionator, text-table, and strip-json-comments remain consistent, ensuring core functionalities are preserved.
However, notable differences emerge in the specified versions of certain dependencies. While 0.4.4 uses a wildcard ("*") for esprima, giving more headroom for updates, 0.4.5 tightens this, specifying "~1.1.1", potentially addressing compatibility issues or leveraging specific features from that particular esprima build. The escope dependency shifts from "1.0.0" in 0.4.4 to "~1.0.0" in 0.4.5. This update indicates a refinement and a more concrete dependency management. Further, version 0.4.5 introduces eslint-tester as a devDependency, which clearly points to an improvement of a testing infrastructure that gives more stability for the library.
For developers, these changes highlight the ongoing evolution of ESLint toward greater stability and refined dependency management. While both versions offer robust JavaScript linting capabilities, the move towards explicitly defined dependency versions in 0.4.5 suggests a focus on reducing potential conflicts and ensuring a more predictable development experience. This commitment to testing via the new eslint-tester module also means more reliable and consistent test runs for your project.
All the vulnerabilities related to the version 0.4.5 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.
Denial of Service in js-yaml
Versions of js-yaml
prior to 3.13.0 are vulnerable to Denial of Service. By parsing a carefully-crafted YAML file, the node process stalls and may exhaust system resources leading to a Denial of Service.
Upgrade to version 3.13.0.
Code Injection in js-yaml
Versions of js-yaml
prior to 3.13.1 are vulnerable to Code Injection. The load()
function may execute arbitrary code injected through a malicious YAML file. Objects that have toString
as key, JavaScript code as value and are used as explicit mapping keys allow attackers to execute the supplied code through the load()
function. The safeLoad()
function is unaffected.
An example payload is
{ toString: !<tag:yaml.org,2002:js/function> 'function (){return Date.now()}' } : 1
which returns the object
{
"1553107949161": 1
}
Upgrade to version 3.13.1.
Arbitrary Code Execution in underscore
The package underscore
from 1.13.0-0 and before 1.13.0-2, from 1.3.2 and before 1.12.1 are vulnerable to Arbitrary Code Execution via the template function, particularly when a variable property is passed as an argument as it is not sanitized.
Regular Expression Denial of Service in underscore.string
Versions of underscore.string
prior to 3.3.5 are vulnerable to Regular Expression Denial of Service (ReDoS).
The function unescapeHTML
is vulnerable to ReDoS due to an overly-broad regex. The slowdown is approximately 2s for 50,000 characters but grows exponentially with larger inputs.
Upgrade to version 3.3.5 or higher.