Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node module vulnerabilities #889

Open
henrikac opened this issue Oct 20, 2021 · 6 comments
Open

node module vulnerabilities #889

henrikac opened this issue Oct 20, 2021 · 6 comments
Labels
General Problem This is a problem in the archive or an implementation.

Comments

@henrikac
Copy link
Contributor

Installing node modules with npm install gives the following output:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 421 packages from 433 contributors and audited 422 packages in 11.623s

19 packages are looking for funding
  run `npm fund` for details

found 16 vulnerabilities (7 moderate, 9 high)
  run `npm audit fix` to fix them, or `npm audit` for details

and npm audit gives the following output:

                       === npm audit security report ===                        
                                                                                
# Run  npm update lodash --depth 5  to resolve 6 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Command Injection in lodash                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > @honkit/asciidoc > lodash                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-35jh-r3h4-6jhm            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Command Injection in lodash                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > @honkit/asciidoc > @honkit/html > lodash            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-35jh-r3h4-6jhm            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Command Injection in lodash                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > @honkit/asciidoc > @honkit/html > cheerio > lodash  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-35jh-r3h4-6jhm            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution in lodash                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > @honkit/asciidoc > lodash                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-p6mc-m468-83gw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution in lodash                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > @honkit/asciidoc > @honkit/html > lodash            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-p6mc-m468-83gw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution in lodash                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > @honkit/asciidoc > @honkit/html > cheerio > lodash  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-p6mc-m468-83gw            │
└───────────────┴──────────────────────────────────────────────────────────────┘


# Run  npm update mkdirp --depth 4  to resolve 2 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype Pollution in minimist                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ minimist                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > cpr > mkdirp > minimist                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-vh95-rmgr-6w4m            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype Pollution in minimist                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ minimist                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > flat-cache > write > mkdirp > minimist              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-vh95-rmgr-6w4m            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────┐
│                                Manual Review                                 │
│            Some vulnerabilities require your attention to resolve            │
│                                                                              │
│         Visit https://go.npm.me/audit-guide for additional guidance          │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Inefficient Regular Expression Complexity in nth-check       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ nth-check                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=2.0.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gitbook-plugin-prism                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gitbook-plugin-prism > cheerio > css-select > nth-check      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-rp65-9cf3-cjxr            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Inefficient Regular Expression Complexity in nth-check       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ nth-check                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=2.0.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > juice > cheerio > css-select > nth-check            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-rp65-9cf3-cjxr            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Inefficient Regular Expression Complexity in nth-check       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ nth-check                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=2.0.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ honkit                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ honkit > @honkit/asciidoc > @honkit/html > cheerio >         │
│               │ css-select > nth-check                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-rp65-9cf3-cjxr            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Regular Expression Denial of Service in trim-newlines        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ trim-newlines                                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=3.0.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gitbook-plugin-include-codeblock                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gitbook-plugin-include-codeblock > meow > trim-newlines      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-7p7h-4mm5-852v            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Command Injection in lodash                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.21                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ 2335c8d82d8c13c5461d6f17e013c1671de3492b77dd76026b20bba1c89… │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ 2335c8d82d8c13c5461d6f17e013c1671de3492b77dd76026b20bba1c89… │
│               │ > lodash                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-35jh-r3h4-6jhm            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution in lodash                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.19                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ 2335c8d82d8c13c5461d6f17e013c1671de3492b77dd76026b20bba1c89… │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ 2335c8d82d8c13c5461d6f17e013c1671de3492b77dd76026b20bba1c89… │
│               │ > lodash                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-p6mc-m468-83gw            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype Pollution in minimist                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ minimist                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.2.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gitbook-plugin-prism                                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gitbook-plugin-prism > mkdirp > minimist                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-vh95-rmgr-6w4m            │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate      │ Prototype Pollution in minimist                              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ minimist                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.2.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gitbook-plugin-wordcount                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gitbook-plugin-wordcount > html-to-text > optimist >         │
│               │ minimist                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://github.com/advisories/GHSA-vh95-rmgr-6w4m            │
└───────────────┴──────────────────────────────────────────────────────────────┘
found 16 vulnerabilities (7 moderate, 9 high) in 422 scanned packages
  run `npm audit fix` to fix 8 of them.
  8 vulnerabilities require manual review. See the full report for details.
@Amaras Amaras added General Problem This is a problem in the archive or an implementation. labels Oct 21, 2021
@ntindle
Copy link
Member

ntindle commented Oct 21, 2021

I can probably pick up a fix for some of these

@ntindle
Copy link
Member

ntindle commented Nov 9, 2021

Having looked at this, we would probably have to move these to our own modules and begin fixing from there. There hasn't been fixes upstream for much of this.

@leios
Copy link
Member

leios commented Nov 9, 2021

It looks like we need to fix lodash and minimist? Is there any chance of being able to fix these and push them upstream or do we need our own repos?

@ntindle
Copy link
Member

ntindle commented Nov 16, 2021

I don't think lodash and minimist are the problems. I am concerned about the packages using them updating. We may have to fork them to do so.

@leios
Copy link
Member

leios commented Nov 16, 2021

Are you talking about honkit, itself?

@ntindle
Copy link
Member

ntindle commented Nov 27, 2021

exactly. You can read the Path part of the table above to find what dependency chain it exists under

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Problem This is a problem in the archive or an implementation.
Projects
None yet
Development

No branches or pull requests

4 participants