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 issue #548

Closed
lodow opened this issue Sep 21, 2017 · 2 comments
Closed

Security issue #548

lodow opened this issue Sep 21, 2017 · 2 comments

Comments

@lodow
Copy link

lodow commented Sep 21, 2017

While checking security of my project I found a vulnerability in this package.

[Nsp] (+) 1 vulnerabilities found
[Nsp] │Regular Expression Denial of Service
[Nsp] │ Name │ tough-cookie │
[Nsp] │ CVSS │ 7.5 (High) │
[Nsp] │ Installed │ 2.3.2 │
[Nsp] │ Vulnerable │ All │
[Nsp] │ Patched │ None │
[Nsp] │ Path │ [email protected] > [email protected] > request@… │
[Nsp] │ More Info │ https://nodesecurity.io/advisories/525

@recrsn
Copy link
Collaborator

recrsn commented Sep 21, 2017

bcrypt itself has no runtime dependencies. node-pre-gyp is used to install compiled binaries from `Github during install. The correct place to open this issue would be with node-pre-gyp or request module.

The ReDoS vulnerebility cannot be triggered on bcrypt while running.

However if you are paranoid, you can use npm install --build-from-source to compile all binaries. This does not use the code-path involving the tough-cookie module.

@recrsn recrsn closed this as completed Sep 21, 2017
@thom-nic
Copy link
Contributor

thom-nic commented Oct 2, 2017

@agathver Indeed, however the problem is although node-pre-gyp is not really a runtime dependency, it is listed as one because it's needed at install time. I blame npm (joking) but since we can't fix that... node-pre-gyp currently has an open issue for this on their end: mapbox/node-pre-gyp#322.

A lot of nsp users are going to run into this for dependencies that rely on node-pre-gyp unfortunately. Since bcrypt depends on an exact node-pre-gyp version it would be good if you can update your dependency once they release a new version.

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

3 participants