---
id: "CVE-2026-78659"
kind: "vulnerability"
aliases: ["CVE-2026-78659", "GO-2026-6603"]
title: "HTTP/2 server memory exhaustion due to Trailer headers in net/http"
severity: "high"
cvss: 7.5
epss: 0.0057
exploited: false
status: "open"
category: "runtime"
products: [{"name": "stdlib", "fixed": ["1.26.9"], "affected": "< 1.26.9", "ecosystem": "go"}, {"name": "stdlib", "fixed": ["1.27.2"], "affected": ">= 1.27.0-0, < 1.27.2", "ecosystem": "go"}, {"name": "golang.org/x/net", "fixed": ["0.60.0"], "affected": "< 0.60.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["go", "go-services", "golang.org/x/net", "http2", "runtime", "self-hosted"]
not_affected_if: ["behind-proxy-stripping-trailers", "go-version-patched", "http1-only"]
published_at: "2026-10-08T22:31:09+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T19:56:07+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6603", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-78659", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-78659", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# HTTP/2 server memory exhaustion due to Trailer headers in net/http

A malicious client can send an HTTP/2 request with a Trailer header that declares a very large number of fields, making a Go net/http server allocate a disproportionate amount of memory. An attacker can exhaust server memory and cause denial of service, bypassing the header count and size limits.

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

## Affected

- go:stdlib affected < 1.26.9 fixed 1.26.9
- go:stdlib affected >= 1.27.0-0, < 1.27.2 fixed 1.27.2
- go:golang.org/x/net affected < 0.60.0 fixed 0.60.0

## How to check

Run go version on the build or host and compare against the affected ranges: stdlib below 1.26.9, or 1.27.0 through 1.27.1.
Check go.mod or the lockfile for golang.org/x/net below 0.60.0.

## Fix

Upgrade the Go toolchain to 1.26.9 or 1.27.2 and rebuild the server binaries.
Upgrade golang.org/x/net to 0.60.0 and rebuild.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6603
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-78659
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-78659

## From the sources

When "Trailer" headers are sent by a client, the HTTP server internally uses the header values to populate the Request.Trailer map passed to the server handler. Because Request.Trailer is a map, each entry incurs memory overhead. For HTTP/2 servers, a malicious client can exploit this by sending a "Trailer" header that declares a large number of fields, causing the server to allocate a disproportionate amount of memory while bypassing Server.MaxHeaderValueCount and Server.MaxHeaderBytes limits. This exploit is not applicable for HTTP/1 servers, which do not support multiplexing a large number of requests over one TCP connection, and whose Server.MaxHeaderBytes are calculated differently.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
