Mocha is a versatile and widely-used JavaScript test framework, providing a clean and flexible environment for running tests in Node.js and the browser. Comparing versions 5.0.2 and 5.0.1 reveals subtle yet noteworthy updates. Both share the same core dependencies, including he for HTML entity encoding, diff for generating readable diff outputs in test failures, glob for file pattern matching, debug for conditional logging, and commander for command-line interface creation. However, a key difference lies in the browser-stdout dependency. Version 5.0.2 uses browser-stdout version 1.3.1, while 5.0.1 relies on version 1.3.0. This potentially signifies a bug fix or minor feature addition related to handling standard output within browser environments.
The devDependencies, crucial for development and testing, remain consistent across both versions, including tools like eslint for code linting, nyc for code coverage, karma for cross-browser testing, and browserify for bundling. This indicates a stable development workflow and consistent tooling between the releases. Developers upgrading from 5.0.1 to 5.0.2 should investigate the changes in browser-stdout 1.3.1 to understand if the update addresses any specific issues they might have encountered in browser-based testing. The release date difference of approximately three weeks suggests that the update was likely addressing reported bugs or minor improvements rather than a major feature overhaul. Both versions maintain the MIT license, ensuring freedom for developers to use and modify the framework.
All the vulnerabilities related to the version 5.0.2 of the package
Regular Expression Denial of Service (ReDoS)
A vulnerability was found in diff before v3.5.0, the affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks.
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).