I recently pushed an update on our site to our server which somehow caused it to become infected and a bunch of our files to get corrupted, users to start getting redirected to random sites, etc. Apparently this was caused by one of our dependencies. I am using npm to manage our site's dependencies and have recently learned about npm audit. Whenever I run npm audit there are 15 vulnerabilities that require manual review and I have tried fixing them by updating to the versions suggested on the more info section of each on the report but the vulnerability still persists when I run npm audit. I tried updating the version in the relevant packages in the path section of the report and it still persists when I run npm audit. I obviously don't want to upload files with vulnerabilities again and ruin all of the sites on our server, I am just very unsure how to fix these security vulnerabilities that come up with npm audit.
For example, here is the only high risk showing up on the report:
High │ Regular Expression Denial of Service
Package │ tough-cookie
Patched in │ >=2.3.3
Dependency of │ gulp-uncss [dev]
Path │ gulp-uncss > uncss > request > tough-cookie
More info │ https://nodesecurity.io/advisories/525
When I update the package to >= 2.3.3 in my package.json as well as in request then run npm audit the vulnerability still persists. Any idea how to fix this/fix the vulnerability?