apigee-127 / swagger-node-runner

The heart of Swagger-Node
MIT License
102 stars 123 forks source link

Vulnerabilities reported by npm audit #133

Open ghost opened 6 years ago

ghost commented 6 years ago

npm audit shows for the latest version the following vulnerabilities:


┌──────────────────────────────────────────────────────────────────────────────┐
│                                Manual Review                                 │
│            Some vulnerabilities require your attention to resolve            │
│                                                                              │
│         Visit https://go.npm.me/audit-guide for additional guidance          │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes > lodash │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > lodash                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > machine > lodash                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > machine > rttc > lodash                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > machine > switchback > lodash             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > machinepack-urls > lodash                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > machinepack-urls > machine > lodash       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > machinepack-urls > machine > rttc >       │
│               │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > lodash            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ nsp                                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ nsp > cli-table2 > lodash                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=4.17.5                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > bagpipes >        │
│               │ machinepack-http > machinepack-urls > machine > switchback > │
│               │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/577                       │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Low           │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ deep-extend                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.5.1                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ swagger-express-mw                                           │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ swagger-express-mw > swagger-node-runner > sway >            │
│               │ json-schema-faker > deref > deep-extend                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/612                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

The following depencies are used:

├─┬ swagger-express-mw@0.7.0
│ └─┬ swagger-node-runner@0.7.3
│   ├── async@1.5.2
│   ├─┬ bagpipes@0.1.2
│   │ ├── async@1.5.2
│   │ ├── debug@2.6.9 deduped
│   │ ├── jspath@0.3.4
│   │ ├── lodash@3.10.1
│   │ ├─┬ machinepack-http@2.4.0
│   │ │ ├── lodash@3.10.1
│   │ │ ├─┬ machine@10.4.0
│   │ │ │ ├── convert-to-ecmascript-compatible-varname@0.1.5
│   │ │ │ ├── debug@2.6.9 deduped
│   │ │ │ ├── lodash@3.10.1
│   │ │ │ ├── object-hash@0.3.0
│   │ │ │ ├─┬ rttc@7.4.0
│   │ │ │ │ └── lodash@3.10.1
│   │ │ │ └─┬ switchback@2.0.2
│   │ │ │   └── lodash@3.10.1
│   │ │ ├─┬ machinepack-urls@4.1.0
│   │ │ │ ├── lodash@3.10.1
│   │ │ │ └─┬ machine@9.1.2
│   │ │ │   ├── convert-to-ecmascript-compatible-varname@0.1.5 deduped
│   │ │ │   ├── debug@2.6.9 deduped
│   │ │ │   ├── lodash@3.10.1 deduped
│   │ │ │   ├── object-hash@0.3.0 deduped
│   │ │ │   ├─┬ rttc@4.5.2
│   │ │ │   │ └── lodash@3.10.1 deduped
│   │ │ │   └─┬ switchback@1.1.3
│   │ │ │     └── lodash@2.4.2
│   │ │ └── request@2.87.0 deduped
│   │ ├── mustache@2.3.0
│   │ └── pipeworks@1.3.1
│   ├── body-parser@1.18.3 deduped
│   ├─┬ config@1.30.0
│   │ ├── json5@0.4.0
│   │ └── os-homedir@1.0.2
│   ├─┬ cors@2.8.4
│   │ ├── object-assign@4.1.1 deduped
│   │ └── vary@1.1.2 deduped
│   ├── debug@2.6.9 deduped
│   ├── js-yaml@3.12.0 deduped
│   ├── lodash@3.10.1
│   ├─┬ multer@1.3.1
│   │ ├── append-field@0.1.0
│   │ ├─┬ busboy@0.2.14
│   │ │ ├─┬ dicer@0.2.5
│   │ │ │ ├─┬ readable-stream@1.1.14
│   │ │ │ │ ├── core-util-is@1.0.2 deduped
│   │ │ │ │ ├── inherits@2.0.3 deduped
│   │ │ │ │ ├── isarray@0.0.1
│   │ │ │ │ └── string_decoder@0.10.31
│   │ │ │ └── streamsearch@0.1.2
│   │ │ └─┬ readable-stream@1.1.14
│   │ │   ├── core-util-is@1.0.2 deduped
│   │ │   ├── inherits@2.0.3 deduped
│   │ │   ├── isarray@0.0.1
│   │ │   └── string_decoder@0.10.31
│   │ ├── concat-stream@1.6.2 deduped
│   │ ├── mkdirp@0.5.1 deduped
│   │ ├── object-assign@3.0.0
│   │ ├── on-finished@2.3.0 deduped
│   │ ├── type-is@1.6.16 deduped
│   │ └── xtend@4.0.1 deduped
│   ├── parseurl@1.3.2 deduped
│   ├── qs@6.5.2 deduped
│   ├─┬ sway@1.0.0
│   │ ├── debug@2.6.9 deduped
│   │ ├── js-base64@2.4.5
│   │ ├── js-yaml@3.12.0 deduped
│   │ ├─┬ json-refs@2.1.7
│   │ │ ├── commander@2.16.0
│   │ │ ├─┬ graphlib@2.1.5
│   │ │ │ └── lodash@4.17.10 deduped
│   │ │ ├── js-yaml@3.12.0 deduped
│   │ │ ├── native-promise-only@0.8.1 deduped
│   │ │ ├─┬ path-loader@1.0.4
│   │ │ │ ├── native-promise-only@0.8.1 deduped
│   │ │ │ └─┬ superagent@3.8.3
│   │ │ │   ├── component-emitter@1.2.1 deduped
│   │ │ │   ├── cookiejar@2.1.2 deduped
│   │ │ │   ├─┬ debug@3.1.0
│   │ │ │   │ └── ms@2.0.0 deduped
│   │ │ │   ├── extend@3.0.1 deduped
│   │ │ │   ├─┬ form-data@2.3.2
│   │ │ │   │ ├── asynckit@0.4.0 deduped
│   │ │ │   │ ├── combined-stream@1.0.6 deduped
│   │ │ │   │ └── mime-types@2.1.18 deduped
│   │ │ │   ├── formidable@1.2.1 deduped
│   │ │ │   ├── methods@1.1.2 deduped
│   │ │ │   ├── mime@1.4.1 deduped
│   │ │ │   ├── qs@6.5.2 deduped
│   │ │ │   └── readable-stream@2.3.6 deduped
│   │ │ ├── slash@1.0.0
│   │ │ └─┬ uri-js@3.0.2
│   │ │   └── punycode@2.1.1
│   │ ├─┬ json-schema-faker@0.2.16
│   │ │ ├── chance@1.0.16
│   │ │ ├─┬ deref@0.6.4
│   │ │ │ └── deep-extend@0.4.2
│   │ │ ├── faker@3.1.0
│   │ │ └─┬ randexp@0.4.9
│   │ │   ├── drange@1.0.2
│   │ │   └── ret@0.2.2
│   │ ├── lodash@4.17.10 deduped
│   │ ├── native-promise-only@0.8.1
│   │ ├─┬ path-to-regexp@1.7.0
│   │ │ └── isarray@0.0.1
│   │ ├── swagger-methods@1.0.4
│   │ ├── swagger-schema-official@2.0.0-bab6bed
│   │ └─┬ z-schema@3.22.0
│   │   ├── commander@2.16.0 deduped
│   │   ├── lodash.get@4.4.2 deduped
│   │   ├── lodash.isequal@4.5.0
│   │   └── validator@10.4.0
│   └── type-is@1.6.16 deduped
Nephos commented 6 years ago

Hello,

Vulnerabilities, even low severity ones should not be ignored. Furthermore, the patch should be quick, a simple update of lodash

sscots commented 6 years ago

:+1: +1

ethanempe commented 6 years ago

👍 We are using this and ran into the same vulnerabilities. Looks like _.where and _.findWhere need to be updated to use _.filter and _.find respectively. Source: https://github.com/lodash/lodash/issues/1773

ylulloa commented 6 years ago

@ethanempe: what about a PR with that suggestion? :)

plaa commented 4 years ago

As this package seems to be abandoned, I created forked versions of swagger-express-mw, swapper-node-runner and bagpipes which fix all but one minor vulnerability (blocked by #137). I don't plan on maintaining them other than possible occasional lib updates.

You can use patched libs you need by:

"swagger-express-mw": "Vincit/swagger-express#026b9527ebb8402db20bc479ed21e4047f1c45ba",
"swagger-node-runner": "Vincit/swagger-node-runner#427d0a4c43599de4aa03e2b3a359847b1b75cf84"
"bagpipes": "Vincit/bagpipes#b2eb059ba6f87c9185a83646fe5bac48288ccea4",

(I always recommend using commit-id locked versions when referring directly to Github repositories.)