Uncaught Exception Affecting fastify package, versions >=5.8.0 <5.12.8>=6.0.0-alpha.0 <6.0.0-alpha.6


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.33% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Uncaught Exception vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-FASTIFY-22148885
  • published3 Nov 2026
  • disclosed2 Nov 2026
  • creditSLRHR

Introduced: 2 Nov 2026

NewCVE-2026-120216  (opens in a new tab)
CWE-248  (opens in a new tab)

How to fix?

Upgrade fastify to version 5.12.8, 6.0.0-alpha.6 or higher.

Overview

fastify is an overhead web framework, for Node.js.

Affected versions of this package are vulnerable to Uncaught Exception via the handlerTimeout path in lib/route.js when a route returns a streaming response. When the server is configured with a nonzero handlerTimeout and a streaming response has already transmitted its headers but remains open past the timeout, Fastify attempts to send a new error response on the already-started response, raising an uncaught ERR_HTTP_HEADERS_SENT that terminates the Node.js process and interrupts all in-flight requests. An unauthenticated remote client can trigger this crash with a single request to an affected streaming endpoint.

Note: This is only exploitable when handlerTimeout is explicitly set to a nonzero value; the default handlerTimeout: 0 is not affected.

Workaround

Set handlerTimeout to 0 (the default), which disables the affected timeout path.

CVSS Base Scores

version 4.0
version 3.1