Yargs version 1.0.0 marks an initial release of a lightweight option parsing tool for Node.js, providing developers with a straightforward mechanism to process command-line arguments and map them into a readily accessible argv hash. Built upon the core dependency minimist at version ~0.0.1, this early iteration focuses on simplicity, offering a fundamental approach to argument parsing without the complexities of optstrings commonly found in more feature-rich alternatives.
This version, released in November 2013, caters to developers seeking a no-frills solution for basic command-line interaction. Its lean design emphasizes ease of use and integration, sacrificing advanced features for lightweight performance. The hashish and tap dependencies are used for development purposes to provide testing utilities.
Although details are scarce regarding its predecessor, transitioning to Yargs 1.0.0 would introduce a clearly defined, albeit basic, framework for argument handling. Developers should note the absence of sophisticated argument validation or command definition features, inherent in later versions. The MIT/X11 license promotes flexibility, while the provided repository link leads to the project's Git repository, allowing developers to contribute or further modify the functionality as needed. In essence, Yargs 1.0.0 served as a foundation for the more advanced capabilities that the Yargs library would come to offer.
All the vulnerabilities related to the version 1.0.0 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).