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

Node Security Project advisory against ms package <=0.7.0 #2327

Closed
deansheather opened this issue Nov 29, 2015 · 13 comments
Closed

Node Security Project advisory against ms package <=0.7.0 #2327

deansheather opened this issue Nov 29, 2015 · 13 comments

Comments

@deansheather
Copy link

The ms package which is included as a dependency 4 times when installing socket.io through the npm install socket.io command has been found to have a ReDoS vulnerability.

The advisory can be found at Node Security Project. The advisory page contains proof of concept, results for the tests and methods to remediate this issue.

As you can see on the advisory page, to fix this vulnerability we would need to upgrade the dependencies for socket.io to use ms version 0.7.1 or greater OR limit the length of the input before passing it into ms.

I became aware of this issue after executing the nsp check command:

$ nsp check
(+) 4 vulnerabilities found
┌───────────────┬───────────────────────────────────────────────────────────────────────────────────────────────┐
│               │ Regular Expression Denial of Service                                                          │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Name          │ ms                                                                                            │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Installed     │ 0.6.2                                                                                         │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Vulnerable    │ <=0.7.0                                                                                       │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Patched       │ >0.7.0                                                                                        │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Path          │ socket.io > debug > ms                                                                        │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ More Info     │ https://nodesecurity.io/advisories/46                                                         │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬───────────────────────────────────────────────────────────────────────────────────────────────┐
│               │ Regular Expression Denial of Service                                                          │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Name          │ ms                                                                                            │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Installed     │ 0.6.2                                                                                         │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Vulnerable    │ <=0.7.0                                                                                       │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Patched       │ >0.7.0                                                                                        │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Path          │ socket.io > engine.io > debug > ms                                                            │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ More Info     │ https://nodesecurity.io/advisories/46                                                         │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬───────────────────────────────────────────────────────────────────────────────────────────────┐
│               │ Regular Expression Denial of Service                                                          │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Name          │ ms                                                                                            │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Installed     │ 0.6.2                                                                                         │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Vulnerable    │ <=0.7.0                                                                                       │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Patched       │ >0.7.0                                                                                        │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Path          │ socket.io > socket.io-client > engine.io-client > debug > ms                                  │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ More Info     │ https://nodesecurity.io/advisories/46                                                         │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬───────────────────────────────────────────────────────────────────────────────────────────────┐
│               │ Regular Expression Denial of Service                                                          │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Name          │ ms                                                                                            │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Installed     │ 0.6.2                                                                                         │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Vulnerable    │ <=0.7.0                                                                                       │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Patched       │ >0.7.0                                                                                        │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ Path          │ socket.io > socket.io-adapter > debug > ms                                                    │
├───────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ More Info     │ https://nodesecurity.io/advisories/46                                                         │
└───────────────┴───────────────────────────────────────────────────────────────────────────────────────────────┘

You can confirm that socket.io is using ms version 0.6.2 by typing npm ls in your project directory.

@darrachequesne
Copy link
Member

Hi! I think an issue has already been opened on this matter, and the package debug bumped consequently:

Thanks for the report!

Note: socket.io and socket.io-adapter will soon be released with that change included

@BeneStem
Copy link

+1

@deansheather
Copy link
Author

Sorry about that then, I had a quick look through and a search and I didn't see anything about it...

@BeneStem
Copy link

BeneStem commented Dec 2, 2015

My +1 was ment for your post.
I didnt find any other than yours myself.
Dont be sorry, it's an important security fix!

On 02.12.2015, at 05:00, Dean Sheather [email protected] wrote:

Sorry about that then, I had a quick look through and a search and I didn't see anything about it...


Reply to this email directly or view it on GitHub.

@reedloden
Copy link

Any ETA for when a new release will be made with the fix?

@OmgImAlexis
Copy link

This has been updated but the version for socket.io itself hasn't been bumped and it hasn't been pushed to npm yet.

On npm 1.3.7 still contains the old version of debug.

@bryce-larson
Copy link

+1

@mikermcneil
Copy link

@rauchg would you guys be able to do a patch release with engine.io and socket.io-client dependencies bumped to address https://snyk.io/test/npm/socket.io? It looks like https://snyk.io/test/npm/socket.io-client would need its deps bumped and to be published first, as well. Thanks man, and keep up the great work as always!

@rauchg
Copy link
Contributor

rauchg commented Jan 5, 2016

Just released engine.io, working on the socket.io release @mikermcneil

@rauchg
Copy link
Contributor

rauchg commented Jan 5, 2016

1.4.0 out

@mikermcneil
Copy link

@rauchg thanks!

@mikermcneil
Copy link

@deansheather btw this hasn't updated on snyk yet, but I double checked the package.json files in question and I believe that resolves this issue. Thanks for the detailed analysis!

@deansheather
Copy link
Author

No problem at all @mikermcneil! Could someone please close this issue now that this problem has been solved?

@nkzawa nkzawa closed this as completed Jan 17, 2016
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

10 participants