Packages / fastify / Security

LowVulnerabilityGHSA-mrq3-vjjr-p77cCVE-2026-25224Published 2 Feb 2026

Fastify Vulnerable to DoS via Unbounded Memory Allocation in sendWebStream

Affected releases · fastify

  • 5.x5.0.0 – 5.7.2Fixed in 5.7.3
  • 4.x and older0.0.1 – 4.29.1No fix, no longer updated

On 5.x, the newest line:

npm install fastify@5.7.3
5.x
  1. Affected

    5.0.0 – 5.7.2

    17 releases

  2. Fixed

    5.7.3 – 5.12.7

    22 releases, latest

4.x
  1. Affected

    4.0.0 – 4.29.1

    61 releases

3.x
  1. Affected

    3.0.0 – 3.29.5

    71 releases

2.x
  1. Affected

    2.0.0 – 2.15.3

    25 releases

1.x
  1. Affected

    1.0.0 – 1.14.6

    31 releases

0.x
  1. Affected

    0.0.1 – 0.43.0

    73 releases

300 stable releases of fastify, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for fastify. It is read in your browser and sent nowhere.

What happens

Impact

A Denial of Service vulnerability in Fastify’s Web Streams response handling can allow a remote client to exhaust server memory. Applications that return a ReadableStream (or Response with a Web Stream body) via reply.send() are impacted. A slow or non-reading client can trigger unbounded buffering when backpressure is ignored, leading to process crashes or severe degradation.

Patches

The issue is fixed in Fastify 5.7.3. Users should upgrade to 5.7.3 or later.

Workarounds

Avoid sending Web Streams from Fastify responses (e.g., ReadableStream or Response bodies). Use Node.js streams (stream.Readable) or buffered payloads instead until the project can upgrade.

References