CVE-2021-44906 Prototype Pollution in minimist
Asked Answered
T

1

9

Github dependabot found potential security vulnerabilities in My dependencies.

  • Minimist <=1.2.5 is vulnerable to Prototype Pollution via file index.js, function setKey() (lines 69-95).

I don't know how to fix it. What should I do?

Turnover answered 22/3, 2022 at 9:46 Comment(0)
I
8

Origin: https://github.com/substack/minimist/issues/164

Fix Resolution: minimist - 1.2.6

Install npm-force-resolutions:

npx npm-force-resolutions

then Add field resolutions with the dependency version you want to fix to your package.json file. It modifies package-lock.json to force the installation of a specific version of a transitive dependency.

"resolutions": {
    "minimist": "1.2.6"
}
Indican answered 23/3, 2022 at 13:12 Comment(4)
origin: github.com/substack/minimist/issues/164Indican
I had to run npx npm-force-resolutions after modifying package.jsonSanjak
You can find some more background information on this here - what are resolutions and why do you need them?Parapsychology
See also here: minimist-vulnerabilityParapsychology

© 2022 - 2024 — McMap. All rights reserved.