Vulnerability library
Security checkJanuary 27, 2023

yargs-parser Vulnerable to Prototype Pollution

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmyargs-parser

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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.

Recommendation

Update the yargs-parser package to the latest compatible version. Followings are version details:

  • Affected version(s): **>= 16.0.0, < 18.1.1 <= 5.0.0 >= 6.0.0, < 13.1.2 >= 14.0.0, < 15.0.1**
  • Patched version(s): **18.1.1 5.0.1 13.1.2 15.0.1**

References

Could your website be exposed too?

SmartScanner can check your website for yargs-parser Vulnerable to Prototype Pollution and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated January 27, 2023