Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

chore: Update dependencies using vulnerable hoek #254

Closed
wants to merge 1 commit into from

Conversation

welwood08
Copy link
Contributor

@welwood08 welwood08 commented Apr 26, 2018

There is a vulnerability in old versions of hoek and updating these 2 dependencies should lead to a version of hoek that is no longer affected. More information:

I was informed of this issue today by GitHub (and previously on several occasions by Snyk) since I depend on this package, so I expect I'm not alone in noticing this.

The test suite passes locally using bleeding-edge node/npm. I've checked usages of jsonwebtoken in the code and didn't spot anything affected by the major version bump, its dependency tree no longer features hoek at all and should be significantly lighter.

The Travis build on node 0.12 might fail due to lack of ES6 features used by the newer version of hawk in request, but this should be expected since request dropped support for node 0.12 with v2.77 (see request/request#2442)! If supporting that ancient version that reached EOL at the end of 2016 is still desired then migrating away from request to something like needle might be necessary.

Edit: seems the Travis node 4 build also failed, this time because the latest version of npm itself uses an ES6 feature not supported on node 4...

Edit 2: having checked the Snyk report more thoroughly, there are additional vulnerable dependencies that would be resolved or partially resolved by this PR:

There is a vulnerability in old versions of `hoek` and updating these 2 dependencies should lead to a version of `hoek` that is no longer affected. More information:
- https://nodesecurity.io/advisories/566
- https://hackerone.com/reports/310439
@kumar303
Copy link
Contributor

kumar303 commented Apr 27, 2018 via email

@pdehaan
Copy link

pdehaan commented May 17, 2018

+1. Also, looks like updating request may hopefully bypass https://nodesecurity.io/advisories/664 (since newer versions of request may not use the potentially vulnerable stringstream module):

┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Out-of-bounds Read                                                 │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ stringstream                                                       │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 5.2 (Medium)                                                       │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 0.0.6                                                              │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ All                                                                │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ None                                                               │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ jpm@1.3.1 > sign-addon@0.2.1 > request@2.79.0 > stringstream@0.0.6 │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/664                             │
└────────────┴────────────────────────────────────────────────────────────────────┘

@rpl
Copy link
Member

rpl commented May 23, 2018

@welwood08 @kumar303 @pdehaan I'm closing this PR in favor of #257 which updates both jsonwebtoken and request to their last versions, and applies the changes needed on the travis config.

@rpl rpl closed this May 23, 2018
@welwood08 welwood08 deleted the patch-1 branch May 30, 2018 08:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants