Skip to content

node module vulnerabilities #889

Open
@henrikac

Description

@henrikac

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.

Activity

added
ProblemThis is a problem in the archive or an implementation.
on Oct 21, 2021
ntindle

ntindle commented on Oct 21, 2021

@ntindle
Member

I can probably pick up a fix for some of these

ntindle

ntindle commented on Nov 9, 2021

@ntindle
Member

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

leios commented on Nov 9, 2021

@leios
Member

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

ntindle commented on Nov 16, 2021

@ntindle
Member

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

leios commented on Nov 16, 2021

@leios
Member

Are you talking about honkit, itself?

ntindle

ntindle commented on Nov 27, 2021

@ntindle
Member

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralProblemThis is a problem in the archive or an implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      node module vulnerabilities · Issue #889 · algorithm-archivists/algorithm-archive