Yargs version 15.1.0 represents a minor update over version 15.0.2, both iterations of this popular command-line argument parsing library for Node.js. Examining the package metadata, the core dependencies remain identical, suggesting that the fundamental argument parsing logic and handling of internationalization (y18n), command-line user interface (cliui) layout, and other helper utilities haven't undergone significant changes. Key dependencies like yargs-parser, responsible for the actual parsing of command-line arguments, and utilities for file system interaction such as find-up, require-directory, and require-main-filename, remain at the same versions, ensuring consistent behavior for developers relying on existing functionality.
The devDependencies also appear unchanged, indicating that the tooling and testing infrastructure employed for developing and maintaining yargs have been kept consistent between these minor releases. This points to an update that likely includes bug fixes, performance improvements, or minor feature additions rather than a complete overhaul. A notable difference is the slight increase in both fileCount (42 vs 41) and unpackedSize (242766 vs 238154) in the newer version, hinting at the inclusion of new files or modifications to existing ones. For developers, upgrading from 15.0.2 to 15.1.0 should be relatively straightforward, as the API surface seems largely unaffected. If encountering issues, consulting the changelog or release notes for yargs 15.1.0 on the official repository would be beneficial to pinpoint specific alterations. The release date difference also signals that 15.1.0 is a more recent and possibly more secure version due to potential bug fixes.
All the vulnerabilities related to the version 15.1.0 of the package
yargs-parser Vulnerable to Prototype Pollution
Affected versions of yargs-parser
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 --foo.__proto__.bar baz'
adds a bar
property with value baz
to all objects. This is only exploitable if attackers have control over the arguments being passed to yargs-parser
.
Upgrade to versions 13.1.2, 15.0.1, 18.1.1 or later.