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

Security vulnerability in hapijs / hoek 4.2.1 (package-lock.json) #4031

Closed
oskarth opened this issue Apr 27, 2018 · 16 comments
Closed

Security vulnerability in hapijs / hoek 4.2.1 (package-lock.json) #4031

oskarth opened this issue Apr 27, 2018 · 16 comments
Assignees

Comments

@oskarth
Copy link
Contributor

oskarth commented Apr 27, 2018

Problem

Security vulnerability in hapijs / hoek 4.2.1 (package-lock.json) https://nvd.nist.gov/vuln/detail/CVE-2018-3728

image

image

Solution

Either upgrade or remove/replace this dependency.

Suggestion for approach (optional): fork realm, upgrade dependency to switch to the latest version of node-pre-gyp. If it works, Status can use this fork in our org.

Acceptance criteria

No more GH vulnerability alert.

@status-github-bot status-github-bot bot added this to bounty-awaiting-approval in Status Bounty Tracker Apr 27, 2018
@oskarth
Copy link
Contributor Author

oskarth commented Apr 27, 2018

Should be enough to bump to hoek ~> 5.0.3 but would need to test and make sure nothing else breaks with this change.

@joshuawootonn
Copy link

I am getting the same problem on many personal repos

@yenda
Copy link
Contributor

yenda commented Apr 27, 2018

I don't think it is just a small bounty, I can dig further but realm is pinning node-pre-gyp version as you can see here https://github.com/realm/realm-js/blob/master/package.json#L87 and this is this version of node-pre-gyp that is using hawk which has hoek as a dependency.
Latest version of node-pre-gyp doesn't have this dependency.

So to solve this issue the two solutions I see so far are:

  • getting realm to switch to the latest version of node-pre-gyp
  • getting rid of realm

The first one might take quite some time, the second quite some effort.

@oskarth
Copy link
Contributor Author

oskarth commented Apr 27, 2018

@yenda Cheers, do you want to change it to something more appropriate? L maybe? Maybe we (or bounty person) can fork realm and try first option first.

@status-github-bot status-github-bot bot removed this from bounty-awaiting-approval in Status Bounty Tracker Apr 30, 2018
@debragail
Copy link
Contributor

why are you using node-pre-gyp? Just remove it.

@debragail
Copy link
Contributor

debragail commented May 1, 2018

https://github.com/mapbox/node-pre-gyp/wiki/Modules-using-node-pre-gyp

GitHub
node-pre-gyp - Node.js tool for easy binary deployment of C++ addons

@debragail
Copy link
Contributor

debragail commented May 1, 2018

I see that realm uses it but i think it's because it's using the https://github.com/mapbox/node-sqlite3 ... i'd get rid of realm.

GitHub
node-sqlite3 - Asynchronous, non-blocking SQLite3 bindings for Node.js

@rcullito
Copy link
Contributor

rcullito commented May 1, 2018

cc @oskarth @yenda looks like this has also been addressed by the maintainers. this thread may be worth monitoring: request/request#2926 (comment)

@andytudhope andytudhope added this to Bounty Open in Status Bounty Tracker May 2, 2018
@debragail
Copy link
Contributor

screen shot 2018-05-25 at 12 25 33

@debragail
Copy link
Contributor

Did you get an error with the new testflight build?

@sriharigr
Copy link

Have a same issue here. I tried manually changing hoek versions in package-lock.json and then commit to github, the vulnerability issue in github disappears but If I clone it back and do npm install, the versions get changed to 2.16.3 from 4.2.1. Can someone let me know which package in package.json is dependent on hoek, which is probably causing this.

Thanks!

@pablanopete pablanopete moved this from Bounty Open to Stale Bounties in Status Bounty Tracker Jul 17, 2018
@corpetty
Copy link
Contributor

This has gone stale, let's try and get this resolved.

@sriharigr here is the entire dependency tree:
hoek-dependency-tree

@yenda yenda self-assigned this Aug 11, 2018
@yenda
Copy link
Contributor

yenda commented Aug 12, 2018

@corpetty I created an issue on realm issue tracker realm/realm-js#1956. In case they don't answer we'll have to fork it but it is a tricky package to build.

@yenda
Copy link
Contributor

yenda commented Aug 13, 2018

@corpetty realm-js will release Thursday or Friday this week a version that doesn't include this library so I'll publish a PR then.

@corpetty
Copy link
Contributor

Thank you @yenda for looking into this.

@yenda
Copy link
Contributor

yenda commented Sep 18, 2018

@corpetty I think we can close this one ?

@yenda yenda closed this as completed Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants