[BUG] npm audit instructs me to run “npm audit fix” but it doesn’t update any packages
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
In my project, when running npm audit, one of the reported vulnerable packages is listed with the message “fix available via npm audit fix”, but running npm audit fix doesn’t lead to any updated packages and the exact same output as from the earlier run of npm audit is logged.
This occurs on https://github.com/kleinfreund/vue-accessible-color-picker/commit/35bec0e751abad872de79657053cb8de07321faa.
Which dependency from my package.json file is actually the vulnerable one I cannot tell with the new output of npm audit in npm 7. This is what the output looks like:
css-what <5.0.1
Severity: high
Denial of Service - https://npmjs.com/advisories/1754
fix available via `npm audit fix`
node_modules/css-what
css-select <=3.1.2
Depends on vulnerable versions of css-what
node_modules/css-select
svgo 1.0.0 - 2.3.0
Depends on vulnerable versions of css-select
node_modules/svgo
postcss-svgo 4.0.0-nightly.2020.1.9 - 5.0.0-rc.2
Depends on vulnerable versions of svgo
node_modules/postcss-svgo
Expected Behavior
When seeing a message with the clear instruction “fix available via npm audit fix”, I expect this to be truthful and npm audit fix to always produce a changed package-lock.json file.
Steps To Reproduce
- Run
git clone https://github.com/kleinfreund/vue-accessible-color-picker.git - Run
git checkout 35bec0e751abad872de79657053cb8de07321faato checkout the commit on the project’smainbranch at the time of writing this. - Run
npm install - Run
npm audit. ~Observe how currently this includes an entry with the message “fix available vianpm audit fix”.~ For this particular advisory, this is no longer the case, unfortunately. - Run
npm audit fix
Environment
- OS: Ubuntu 20.04
- Node: v14.17.1
- npm: 7.19.0
Same issue here in my project (https://github.com/trickfilm400/vantage-node), Troubleshooting steps tried:
- deleting package-lock.json
- deleting node_modules/ folder
this did not helped in any way
Environment:
- Windows 10
- npm 7.19.0
- node v14.17.0
Screenshot of console output for more information if needed
i'm having the same problem in my project https://github.com/chase-moskal/xiome
Encountering the exact same issue. Enviroment: Windows: 10 Node: 16.9.1 NPM: 7.24.2
Same issue, I ran the suggested force and I don't get better results. Do we need to manually add the updates for each package?
I have the same issue. I attach a screenshot, but there are lot more vuln packages than these 2, which cannot be "fixed".

I'm seeing the same thing on numerous packages as well Win 11 Node 14.16.0 npm 7.6.3

Issue also exist in
$ node --version
v16.13.0
$ npm --version
8.1.0
Same issue here, getting worse and worse each time I run npm audit fix --force! :(
G:\>node --version v16.13.0 G:\>npm --version 8.1.4
Started with:
1 moderate severity vulnerability To address all issues, run: npm audit fix
But after running npm audit fix --force, it then said 27 vulnerabilities (16 moderate, 9 high, 2 critical)
And after running npm audit fix --force again, it said 53 vulnerabilities (12 low, 23 moderate, 16 high, 2 critical)
One time it said 66 vulnerabilities (54 moderate, 11 high, 1 critical), and after that I left it running in a loop (for /L %i in (1,1,50) do npm audit fix --force) which alternated between 27 and 53 vulnerabilities till I killed it.
I'm now attaching all output from the above, which shows the modules it was reporting.
Is there any hope of this issue being resolved?
same problem here.
Npm 8.1.4 Node 17.1.0 WIndows 11
+1, npm audit fix worsens the issue(s), and downgrades packages
I resolved this by removing "npm": "^8.1.3", from the package.json dependencies.
and then npm i && npm audit fix
No idea why it was there to begin with.
As an experiment I added "npm": "^8.2.0", to the dependencies and the vulnerabilities returned with npm i && npm audit fix.
I suggest upgrading to the latest npm (if possible) and searching your package.json AND package-lock.json for "npm": "^
Environment: node: 14.18.1 npm: 8.2.0 (latest as of today)
@kleinfreund I noticed your package-lock.json has "npm": "^7.0.0", as a dependency of "@semantic-release/npm": "^8.0.3"
Same problem... This is a significant problem.
My environment:
Ubuntu 18.04 NPM 8.3.0 Node v16.13.1
I resolved this by removing
"npm": "^8.1.3",from the package.json dependencies. and thennpm i && npm audit fixNo idea why it was there to begin with.As an experiment I added
"npm": "^8.2.0",to the dependencies and the vulnerabilities returned withnpm i && npm audit fix.I suggest upgrading to the latest npm (if possible) and searching your package.json AND package-lock.json for
"npm": "^Environment: node: 14.18.1 npm: 8.2.0 (latest as of today)
@kleinfreund I noticed your package-lock.json has
"npm": "^7.0.0",as a dependency of"@semantic-release/npm": "^8.0.3"
this does not fix the problem for me, I didn't have "npm": "^ in my package.json
Same problem for me.
MacOS 11.6 NPM 8.1.2 Node 16.13.2
Same problem here:
MacOS 12.1 Node v16.13.1 NPM 8.3.0
Same
same
Same
Same
Same
Same
Windows 10 Node v16.13.2 NPM v8.4.0
MacOS Node v16.13.2 NPM v8.1.2
Same issue:
Ubuntu 20.04 Node v16.13.2 NPM 8.3.2
Same issue:
Mac OS Node v16.3.0 NPM v8.1.0
Please upvote 👍 the issue instead of a just commenting on it as a comment notifies everyone waiting for a resolution here and doesn't really add value. (Yes, everyone knows that it is broken across all versions right now.)
same issue: windows 10 node v16.13.2 npm 8.3.0
Same issue: Windows 10 Node v16.13.0 npm 8.1.0
Same issue. macOS Big Sur 11.6.3 node v16.13.1 npm 8.5.0
Tried by:
- deleting package-lock.json
- deleting node_modules folder
- running ncu -u
- running npm update
- and finally running again npm install
It didn't solve the problem.
Running into this issue here on Windows 11 running NPM 8.1.2.