gruntjs / grunt-contrib-connect

Start a static web server.
http://gruntjs.com/
MIT License
716 stars 147 forks source link

Security vulnerability GHSA-6fc8-4gx4-v693 affecting "ws" package (nested dependency) #268

Closed pedrosanta closed 2 years ago

pedrosanta commented 2 years ago

Hi,

As I've commented on https://github.com/gruntjs/grunt-contrib-connect/commit/6289a8abb9bc4b27c466481f84ef0b0b486148f9, perhaps we should drop node-http2 in favor of node own http2 interface because the former has security vulnerabilities.

Actually, I've just now noticed that the reason to change to node-http2 from http2 node interface was a broken test. That's kinda weird: instead of updating the code/calls to match the updated API on node, one just moves all together to a totally different library? Kinda bold.

Anyway node-http2 is currently plagued by a security vulnerability and I think one should simplify and resort to node own http2 interface.

If I can I will throw a PR for that.

Edit:

pedrosanta commented 2 years ago

Upon closer inspection, I've noticed that Node.js http2 module only became stable from v10.10.0 onwards.

And since grunt-contrib-connect supports Node.js versions 10 or greater ("engines": { "node": ">=10" }) it supports all versions of 10.x release, including earlier ones where the http2 module was still experimental API.

So, from my POV, unless the supported node versions were updated (and thus triggering a major version bump on grunt-contrib-connect to 4.0.0) we should not move/upgrade to Node.js http2 module.

Which is kinda unfortunate because:

But again, from my POV:

PS: Meanwhile I'll update this issue to reference/track the security vulnerability in the first place, moreso than moving to http2 module, etc.

pedrosanta commented 2 years ago

Closing in favor of #270.