[BUG] npm audit
recommends reverting to a different version that contains even more vulnearbilities
#6079
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 9.x
work is associated with a specific npm 9 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I am using
[email protected]
, which is dependent on a vulnerable version ofjsonwebtoken
.npm audit
offers to revert to[email protected]
if I use the--force
flag.[email protected]
however, contains 11 vulnerabilities which npm fails to warn about before downgrading.Expected Behavior
I would expect the behaviour to prefer fewer vulnerabilities (especially when 2.5.2 has 3 critical and 3 high vulnerabilities, while 3.84.1 has 1 high and 1 moderate), or at the very least warn of existing vulnerabilities in the offered version.
Steps To Reproduce
npm init
npm i [email protected]
npm audit
npm audit fix --force
Environment
The text was updated successfully, but these errors were encountered: