reactjs - Npm 审计显示创建新的 React Native 项目时存在 9 个漏洞

标签 reactjs react-native npm

当我创建一个新的 React Native 项目并运行 npmaudit 时,我发现了 9 个漏洞。漏洞列表如下表所示:

│ High          │ Denial of Service                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ ws                                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >= 1.1.5 <2.0.0 || >=3.3.1                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ react-native                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ react-native > react-devtools-core > ws                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/550                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ deep-extend                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.5.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ react-native                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ react-native > metro > jest-haste-map > sane > fsevents >    │
│               │ node-pre-gyp > rc > deep-extend                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/612                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ deep-extend                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.5.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ jest-expo                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ jest-expo > jest > jest-cli > jest-haste-map > sane >        │
│               │ fsevents > node-pre-gyp > rc > deep-extend                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/612                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ deep-extend                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.5.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ jest-expo                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ jest-expo > jest > jest-cli > jest-runner > jest-haste-map > │
│               │ sane > fsevents > node-pre-gyp > rc > deep-extend            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/612                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ deep-extend                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.5.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ jest-expo                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ jest-expo > jest > jest-cli > jest-runner > jest-runtime >   │
│               │ jest-haste-map > sane > fsevents > node-pre-gyp > rc >       │
│               │ deep-extend                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/612                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ deep-extend                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.5.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ jest-expo                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ jest-expo > jest > jest-cli > jest-runtime > jest-haste-map  │
│               │ > sane > fsevents > node-pre-gyp > rc > deep-extend          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/612                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ hoek                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ > 4.2.0 < 5.0.0 || >= 5.0.3                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ react-native-scripts [dev]                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ react-native-scripts > xdl > jsonwebtoken > joi > hoek       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/566                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ hoek                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ > 4.2.0 < 5.0.0 || >= 5.0.3                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ react-native-scripts [dev]                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ react-native-scripts > xdl > jsonwebtoken > joi > topo >     │
│               │ hoek                                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/566                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ react-native                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ react-native > plist > xmlbuilder > lodash                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │

当我运行npm outdated时,一切似乎都是最新的。

任何解决这些问题的帮助将不胜感激。

谢谢

最佳答案

尝试运行 $npm list react-native,它会给你概述该包的使用位置以及相应的版本。我的猜测是,这些并不是到处都是最新/必需的。希望这也能有所帮助:npm check and update package if needed ...问题如下:您的软件包都是最新的,但 npm install 命令不会更新 package.json 文件中这些软件包的版本。为此,您需要使用 npm-check-updates:How do I update each dependency in package.json to the latest version?

关于reactjs - Npm 审计显示创建新的 React Native 项目时存在 9 个漏洞,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50338978/

相关文章:

javascript - 使用草稿js在react-draft-wysiwyg编辑器中未显示图像

javascript - 在具有元素大小的较小 div 中模拟 1920x1080 窗口

react-native - ClojureScript重生开发中使用react-native-camera

javascript - React Native 标题/底部标签栏在第一个应用程序加载时跳跃

node.js - NPM - Browserify "' import' and 'export' may appear only with 'sourceType: module' "

javascript - 关于使用 fetch() 和 .then() 构建 react 状态的问题

javascript - 如何在react-redux中正确更新我的initialState

git - 为不同的构建 react native 项目自定义包名称

javascript - Gulp revRewrite mod 不适用于重写元素中的 css 和 js

angular - 如何将 Angular 版本从 15 更新到 16?