Advisory

GHSA-p9pc-299p-vxgp

Also known as: CVE-2020-7608, SNYK-JS-YARGSPARSER-560381

Summary

yargs-parser Vulnerable to Prototype Pollution

Details

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.

Recommendation

Upgrade to versions 13.1.2, 15.0.1, 18.1.1 or later.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2020-09-04 18:00 UTC
Modified
2026-07-08 06:49 UTC

Affected packages and fixes

yargs-parser

npm · All systems

Affected

  • introduced 6.0.0, fixed 13.1.2 (semver)

Fixed versions

13.1.2

Fix

yargs-parser

npm · All systems

Affected

  • introduced 14.0.0, fixed 15.0.1 (semver)

Fixed versions

15.0.1

Fix

yargs-parser

npm · All systems

Affected

  • introduced 16.0.0, fixed 18.1.1 (semver)

Fixed versions

18.1.1

Fix

yargs-parser

npm · All systems

Affected

  • introduced 0, fixed 5.0.1 (semver)

Fixed versions

5.0.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences