# CVE-2026-40898: quic-go memory exhaustion in HTTP/3 trailers

Source: https://junglewise.ai/threats/cve-2026-40898-quic-go-memory-exhaustion-in-http-3-trailers  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-04. Updated: 2026-06-04  
License: CC BY 4.0 with a link back

CVE-2026-40898 · Severity: medium · CVSS 5.3 · Published 2026-06-04

A vulnerability in the quic-go library, which provides QUIC and HTTP/3 networking capabilities for Go applications, can allow an attacker to crash a server or client. By sending specially crafted HTTP/3 trailers, a malicious user can force the application to consume excessive amounts of memory. This results in a denial-of-service (DoS) condition, potentially disrupting business operations and service availability.

Technologies: [github.com/quic-go/quic-go (Go)](https://junglewise.ai/threats/technologies/github-com-quic-go-quic-go). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-40898 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40898 being exploited in the wild.

**How severe is CVE-2026-40898?** Medium severity, with a CVSS score of 5.3, published 4 June 2026.

**Which products and versions are affected?** github.com/quic-go/quic-go (Go) <= 0.59.0, SEMVER:introduced=0,fixed=0.59.1; Quic-Go <= 0.59.0, <= v0.59.0.

**Is there a fix for CVE-2026-40898?** Yes. github.com/quic-go/quic-go (Go): upgrade to 0.59.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40898 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40898?** Check whether you run github.com/quic-go/quic-go (Go) or Quic-Go at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/quic-go/quic-go (Go): upgrade to 0.59.1 or later

  ```sh
  go get github.com/quic-go/quic-go@v0.59.1
  ```


## Technical details

A resource exhaustion vulnerability exists in quic-go's HTTP/3 implementation due to improper validation of decoded field section sizes in QPACK-encoded HEADERS frames used for trailers. While the library enforced limits on the size of compressed frames, it failed to limit the size of the decoded field section. An attacker can exploit this by sending a crafted HEADERS frame that expands significantly upon decoding (up to 50x), leading to excessive memory allocation in both client and server implementations. This issue is addressed in version 0.59.1 by implementing incremental decoding and enforcing RFC 9114 size limits for trailers.

## Affected products

- quic-go quic-go <= v0.59.0

## Identifiers

- CVE-2026-40898
- GHSA-vvgj-x9jq-8cj9
- GO-2026-5676

## Timeline

- 2026-05-11: patched: Version 0.59.1 released
- 2026-05-31: advisory: GitHub Security Advisory published
- 2026-06-04: disclosed: CVE-2026-40898 published to NVD

## References

- [https://github.com/quic-go/quic-go/releases/tag/v0.59.1](https://github.com/quic-go/quic-go/releases/tag/v0.59.1)
- [https://github.com/quic-go/quic-go/security/advisories/GHSA-vvgj-x9jq-8cj9](https://github.com/quic-go/quic-go/security/advisories/GHSA-vvgj-x9jq-8cj9)

## Related threats

- [GO-2025-4233 - HTTP/3 QPACK Header Expansion DoS in github.com/quic-go/quic-go](https://junglewise.ai/threats/cve-2025-64702-quic-go-http-3-qpack-header-expansion-dos)
- [GO-2025-4017 - Panic occurs when queuing undecryptable packets after handshake completion in github.com/quic-go/quic-go](https://junglewise.ai/threats/cve-2025-59530-quic-go-panic-occurs-when-queuing-undecryptable-packets-after)
- [GO-2025-3735 - Panic in Path Probe Loss Recovery Handling in github.com/quic-go/quic-go](https://junglewise.ai/threats/cve-2025-29785-quic-go-has-panic-in-path-probe-loss-recovery-handling)
- [GO-2024-3302 - ICMP Packet Too Large Injection Attack on Linux in github.com/quic-go/quic-go](https://junglewise.ai/threats/cve-2024-53259-quic-go-affected-by-an-icmp-packet-too-large-injection-attack-on)
- [GO-2024-2682 - Denial of service via connection starvation in github.com/quic-go/quic-go](https://junglewise.ai/threats/cve-2024-22189-quic-s-connection-id-mechanism-vulnerable-to-memory-exhaustion)
