CVE-2026-40898: quic-go: HTTP/3 QPACK Trailer Expansion Memory Exhaustion
Summary An attacker can cause excessive memory allocation in quic-go's HTTP/3 client and server implementations by sending a QPACK-encoded HEADERS frame that decodes into a large trailer field section with many unique field names and/or large values.
Published Jun 3, 2026 · Updated Jun 9, 2026
Affected packages
github.com/quic-go/quic-go
- Ecosystem
- Go
- Affected
- <= 0.59.0
- Fixed in
- 0.59.1
- Check
go list -m github.com/quic-go/quic-go
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
An attacker can cause excessive memory allocation in quic-go's HTTP/3 client and server implementations by sending a QPACK-encoded HEADERS frame that decodes into a large trailer field section with many unique field names and/or large values. The implementation builds an http.Header for the corresponding http.Request or http.Response, while only enforcing limits on the size of the QPACK-compressed HEADERS frame, not on the decoded field section. This can lead to memory exhaustion.
This is very similar to CVE-2025-64702. The difference is that this issue uses HTTP trailers, rather than HTTP headers, as the attack vector.
Impact
A misbehaving or malicious peer can cause a denial-of-service (DoS) attack against quic-go's HTTP/3 servers or clients by triggering excessive memory allocation, potentially leading to crashes or resource exhaustion. This affects both servers and clients due to symmetric header construction.
Details
In HTTP/3, field sections are compressed using QPACK (RFC 9204). Field sections are used for both HTTP headers and trailers. quic-go's HTTP/3 server and client decode the QPACK-encoded HEADERS frame into header fields, then construct an http.Request or http.Response.
http3.Server.MaxHeaderBytes and http3.Transport.MaxResponseHeaderBytes limit the encoded HEADERS frame size, with defaults of 1 MB for servers and 10 MB for clients. However, they did not limit the decoded field section size. A maliciously crafted HEADERS frame carrying trailers can expand to about 50x the encoded size using QPACK static table entries with long names and/or values.
RFC 9114 requires endpoints to enforce decoded field section size limits via SETTINGS, which quic-go did not do for trailers.
The Fix
quic-go now enforces RFC 9114 decoded field section size limits for trailers as well. It incrementally decodes QPACK entries and checks the field section size after each entry, aborting the stream if an entry causes the limit to be exceeded.
References
- https://github.com/quic-go/quic-go/security/advisories/GHSA-vvgj-x9jq-8cj9
- https://github.com/quic-go/quic-go/pull/5642
- https://github.com/quic-go/quic-go/commit/c56e8c79d1627cc1ed6005b421b4b0adadd83665
- https://github.com/advisories/GHSA-g754-hx8w-x2g6
- https://github.com/quic-go/quic-go/releases/tag/v0.59.1
- https://nvd.nist.gov/vuln/detail/CVE-2026-40898
- https://github.com/advisories/GHSA-vvgj-x9jq-8cj9
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2025-64702
quic-go HTTP/3 QPACK Header Expansion DoS
medium5.3Dec 11, 2025CVE-2025-59530
quic-go: Panic occurs when queuing undecryptable packets after handshake completion
high7.5Oct 10, 2025CVE-2025-29785
quic-go Has Panic in Path Probe Loss Recovery Handling
high7.5Jun 3, 2025CVE-2024-53259
quic-go affected by an ICMP Packet Too Large Injection Attack on Linux
medium6.5Dec 2, 2024CVE-2024-22189
QUIC's Connection ID Mechanism vulnerable to Memory Exhaustion Attack
high7.5Apr 2, 2024CVE-2023-49295
quic-go's path validation mechanism can be exploited to cause denial of service
medium6.4Jan 10, 2024
