Intel

AIKIDO-2026-576509

fastify is vulnerable to Uncaught Exception

CVE-2026-120216Published 4 days ago
November 3, 2026

59

CVE Score

Medium

Uncaught Exception

Are you affected? Scan for Free

TL;DR

Before the fix, when a route's streaming response had already written its headers, Fastify's handlerTimeout timer still called reply.send(err), which retried writing the headers and raised an uncaught ERR_HTTP_HEADERS_SENT that terminated the Node.js process. An unauthenticated client could crash the server by holding one request open past the timeout on a streaming route. This requires a nonzero handlerTimeout, since the default 0 never arms the timer. The fix checks reply.raw.headersSent and destroys the in-flight response instead of sending an error.

How do I fix this?

Upgrade the fastify package to 5.12.8 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and set a nonzero handlerTimeout and expose a streaming route that an unauthenticated client can hold open past the timeout.

Package

Versions

5.8.0 - 5.12.7

Fixed in 5.12.8

Background info

fastify is vulnerable to Uncaught Exception in versions 5.8.0 - 5.12.7.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea