socket.io-stream icon indicating copy to clipboard operation
socket.io-stream copied to clipboard

This version of debug is vulnerable to ReDos attacks

Open epg323 opened this issue 5 years ago • 3 comments

This project uses the debug package

Debug has been tagged by the audit package as having low severity vulnerabilities.

Debug should be updated, unless there is a reason not to update it.

https://www.npmjs.com/advisories/534

epg323 avatar Feb 18 '20 23:02 epg323

Yes, I'm having the same issue

derricktang94 avatar Apr 13 '20 05:04 derricktang94

We are seeing this issue as well because we include 'serverless' which has child dependencies that use this.

yarn audit v1.22.4 ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ low │ Regular Expression Denial of Service │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >= 2.6.9 < 3.0.0 || >= 3.1.0 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ serverless │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ serverless > @serverless/components > │ │ │ @serverless/platform-client-china > @serverless/utils-china │ │ │ > socket.io-stream > debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://www.npmjs.com/advisories/534 │ └───────────────┴──────────────────────────────────────────────────────────────┘ 1 vulnerabilities found - Packages audited: 1652 Severity: 1 Low Done in 3.22s.

The solution is to update the package.json to a newer version of 'debug' (>= 2.6.9 < 3.0.0 || >= 3.1.0 )

iamle0pard avatar Jun 19 '20 00:06 iamle0pard

By the way, for anyone who is hitting this issue due to it being a child dependency of serverless, you can update your existing package.json to include this:

"resolutions": {
   "@serverless/utils-china": "^0.1.15"
}

to fix the issue. After doing this the vulnerability goes away.

iamle0pard avatar Jun 19 '20 17:06 iamle0pard