org.webjars.bowergithub.websockets:ws@5.2.2 vulnerabilities

  • latest version

    5.2.2

  • first published

    6 years ago

  • latest version published

    6 years ago

  • licenses detected

  • package manager

Direct Vulnerabilities

Known vulnerabilities in the org.webjars.bowergithub.websockets:ws package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Denial of Service (DoS)

org.webjars.bowergithub.websockets:ws is a simple to use websocket client, server and console for node.js.

Affected versions of this package are vulnerable to Denial of Service (DoS) when the number of received headers exceed the server.maxHeadersCount or request.maxHeadersCount threshold.

How to fix Denial of Service (DoS)?

A fix was pushed into the master branch but not yet published.

[0,)
  • M
Regular Expression Denial of Service (ReDoS)

org.webjars.bowergithub.websockets:ws is a simple to use websocket client, server and console for node.js.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). A specially crafted value of the Sec-Websocket-Protocol header can be used to significantly slow down a ws server.

##PoC

for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
  const value = 'b' + ' '.repeat(length) + 'x';
  const start = process.hrtime.bigint();

  value.trim().split(/ *, */);

  const end = process.hrtime.bigint();

  console.log('length = %d, time = %f ns', length, end - start);
}

How to fix Regular Expression Denial of Service (ReDoS)?

There is no fixed version for org.webjars.bowergithub.websockets:ws.

[0,)