---
id: "CVE-2026-92081"
page: "https://infrastack.ai/live/CVE-2026-92081"
kind: "vulnerability"
aliases: ["CVE-2026-92081", "GHSA-4mh8-r7rc-xpvc"]
title: "fastify vulnerable to Denial of Service via unhandled exception on HTTP/2 trailer responses"
severity: "medium"
cvss: 5.9
epss: 0.00412
exploited: false
status: "open"
category: "package"
products: [{"name": "fastify", "fixed": ["5.12.5"], "affected": "< 5.12.5", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-248", "fastify", "http2", "node", "npm", "package"]
not_affected_if: ["http2-disabled", "no-response-trailers"]
published_at: "2026-09-16T07:38:07+00:00"
first_seen_at: "2026-11-09T22:53:17+00:00"
updated_at: "2026-11-09T23:01:05+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/fastify/fastify/security/advisories/GHSA-4mh8-r7rc-xpvc", "first_seen_at": "2026-11-09T22:53:17+00:00"}, {"source": "ghsa", "url": "https://github.com/advisories/GHSA-4mh8-r7rc-xpvc", "first_seen_at": "2026-11-09T22:57:50+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-92081", "first_seen_at": "2026-11-09T23:10:12+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00412, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-92081"}]
---

# fastify vulnerable to Denial of Service via unhandled exception on HTTP/2 trailer responses

Link for people: https://infrastack.ai/live/CVE-2026-92081 (this .md is for agents)

Fastify adds a forbidden Transfer-Encoding header to HTTP/2 responses that use reply.trailer(), so Node.js throws an uncaught exception and the process exits. One unauthenticated HTTP/2 request to such a route is enough to take the server down, and it can be repeated.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:fastify affected < 5.12.5 fixed 5.12.5

## How to check

- Check the installed version: `npm ls fastify`
- Confirm HTTP/2 is on: look for `http2: true` in the Fastify server options
- Search the code for `reply.trailer(` on routes served over HTTP/2

## Fix

- `fastify` `5.12.5` (5.x line)
- `fastify` `4.29.2` (4.x line)
- Workaround until upgrading: avoid `reply.trailer()` on routes served over HTTP/2

## Timeline

- 2026-11-09T22:53:17+00:00 ghsa-repo https://github.com/fastify/fastify/security/advisories/GHSA-4mh8-r7rc-xpvc
- 2026-11-09T22:57:50+00:00 ghsa https://github.com/advisories/GHSA-4mh8-r7rc-xpvc
- 2026-11-09T23:10:12+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-92081

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/fastify/fastify/security/advisories/GHSA-4mh8-r7rc-xpvc
- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/fastify/fastify/security-advisories/GHSA-4mh8-r7rc-xpvc
- [fix] Patch: github.com https://github.com/fastify/fastify/commit/ad06a4c3fe8a944a904f38068249b18b8f552e90
- [fix] Release: github.com https://github.com/fastify/fastify/releases/tag/v5.12.5

## From the sources

### Impact

`fastify` crashes with an uncaught `ERR_HTTP2_INVALID_CONNECTION_HEADERS` exception when a route that registers a response trailer via `reply.trailer()` is served over HTTP/2. Fastify unconditionally adds the `Transfer-Encoding: chunked` header when a trailer is set, which is forbidden on HTTP/2, so Node.js throws while serializing the response headers. The exception is not caught and becomes an uncaughtException, terminating the Node.js process.

One unauthenticated HTTP/2 request to any route that uses trailers is enough to crash the server, dropping all in-flight requests, and the request can be repeated to keep the process down. Applications are affected only when HTTP/2 is enabled (`http2: true`) and at least one route registers a trailer. HTTP/1.x responses are not affected.

### Patches

Upgrade to `fastify` `5.12.5`, `4.29.2`, or later.

### Workarounds

Avoid registering response trailers with `reply.trailer()` on routes served over HTTP/2 until upgrading.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
