Packages / @fastify/websocket / Security

HighVulnerabilityGHSA-4pcg-wr6c-h9cqCVE-2022-39386Published 7 Nov 2022

fastify/websocket vulnerable to uncaught exception via crash on malformed packet

Your version

Affected releases · @fastify/websocket

  • 7.x7.0.0 – 7.1.0Fixed in 7.1.1
  • 6.x6.0.0 – 6.0.1No fix on this line yet
  • 5.x5.0.0Fixed in 5.0.1

On 7.x, the newest line:

npm install @fastify/websocket@7.1.1
Every release on a timeline
11.x
  1. Not affected

    11.0.0 – 11.3.4

    10 releases, latest

7.x
  1. Affected

    7.0.0 – 7.1.0

    3 releases

  2. Fixed

    7.1.1 – 7.2.0

    4 releases

6.x
  1. Affected

    6.0.0 – 6.0.1

    2 releases

5.x
  1. Affected

    5.0.0

    1 release

  2. Fixed

    5.0.1

    1 release

29 stable releases of @fastify/websocket, oldest to newest, one row per major.

What happens

Impact

Any application using @fastify/websocket could crash if a specific, malformed packet is sent.

All versions of fastify-websocket are also impacted. That module is deprecated, so it will not be patched.

Patches

This has been patched in v7.1.1 (fastify v4) and v5.0.1 (fastify v3).

Workarounds

No known workaround is available. However, it should be possible to attach the error handler manually. The recommended path is upgrading to the patched versions.

Credits

marcolanaro for finding and patching this vulnerability

For more information

If you have any questions or comments about this advisory: