Yargs, a lightweight option parsing library for Node.js applications, saw a minor version bump from 1.1.0 to 1.1.1 on February 14th, 2014. Both versions provide a simple and effective way to parse command-line arguments into an argv hash, simplifying the process of handling user input. They share identical core functionality and dependencies, relying on minimist for argument parsing and utilizing chai, mocha, and hashish for development and testing purposes. The licensing remains consistent under the MIT/X11 license.
The key difference between yargs 1.1.0 and 1.1.1 lies in their release date. Version 1.1.1 was published approximately 38 minutes after version 1.1.0. As the dependencies, functionalities, and descriptions are the same, this suggests that the 1.1.1 release likely addresses a minor bug fix, a subtle internal improvement, or potentially a documentation update that didn't warrant a major or minor version change. Because the changes are so small, for developers already using yargs 1.1.0, upgrading to 1.1.1 would typically be a low-risk task to ensure they have the most up-to-date and stable version. Potential users exploring a basic command-line argument parser for Node.js can consider either version 1.1.0 or 1.1.1 with minimal functional difference, making yargs a reliable choice for streamlining command-line interactions.
All the vulnerabilities related to the version 1.1.1 of the package
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).