首页 > 解决方案 > npm 审计修复:1 个高严重性漏洞:任意文件覆盖

问题描述

   === npm audit security report ===                        

┌───────────────────────────────────────────────────────────────────┐
│                                Manual Review                      │
│      Some vulnerabilities require your attention to resolve       │
│                                                                   │
│  Visit https://go.npm.me/audit-guide for additional guidance      │
└───────────────────────────────────────────────────────────────────┘
┌───────────────┬───────────────────────────────────────────────────┐
│ High          │ Arbitrary File Overwrite                          │
├───────────────┼───────────────────────────────────────────────────┤
│ Package       │ tar                                               │
├───────────────┼───────────────────────────────────────────────────┤
│ Patched in    │ >=4.4.2                                           │
├───────────────┼───────────────────────────────────────────────────┤
│ Dependency of │ gulp-sass                                         │
├───────────────┼───────────────────────────────────────────────────┤
│ Path          │ gulp-sass > node-sass > node-gyp > tar            │
├───────────────┼───────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/803            │
└───────────────┴───────────────────────────────────────────────────┘
found 1 high severity vulnerability in 7659 scanned packages
  1 vulnerability requires manual review. See the full report for details.

标签: securitynpmgulpnpm-installnode-modules

解决方案


我的建议是尝试升级,但它们看起来确实依赖于 3rd 方包。

对于 regexDOS,如果输入正确,它可能会停止工作。不同于第二个漏洞。你应该先升级这个,或者如果你不能完全删除它。

但是 js-yaml 可能会使某些连接停留的时间比应有的时间长,如果在不太可能的情况下您无法升级,那么您可以使用一些软件包来监视和关闭剩余的 http 连接并便宜地推迟一个小dos攻击。Fail2ban * Splunk 用于监控 linux 的春天 :)


推荐阅读