CVE-2026-40898: quic-go HTTP/3 QPACK Trailer Expansion Memory Vulnerability

MODERATE
Advisory Identifier: GHSA-vvgj-x9jq-8cj9
CVSS 5.3
CWE-770
Published
Advisory Summary

CVE-2026-40898 is a MODERATE (CVSS 5.3) http/3 qpack trailer expansion memory vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting quic-go libraries in the Go ecosystem. The issue involves http/3 qpack trailer expansion memory exhaustion. Remediation is available by upgrading affected packages to version 0.59.1.

CVE-2026-40898 at a Glance

CVE Identifier CVE-2026-40898
GHSA Identifier GHSA-vvgj-x9jq-8cj9
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product quic-go
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-40898

To remediate this vulnerability, upgrade all affected quic-go dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/quic-go/quic-go fixed: 0.59.1
Upgrade github.com/quic-go/quic-go to 0.59.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/quic-go/quic-go

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-40898, inspect your project dependencies for quic-go:

inspect dependencies for github.com/quic-go/quic-go

Analyze the terminal output to locate any version of quic-go in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.59.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In quic-go, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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.

CVE-2026-40898 Affected quic-go Versions

1 component(s)
Fixed Versions:
0.59.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/quic-go/quic-go
Go
< 0.59.1
0.59.1

References

Frequently Asked Questions

What is CVE-2026-40898?
CVE-2026-40898 is a security vulnerability in quic-go involving HTTP/3 QPACK Trailer Expansion Memory Exhaustion under CWE-770: Allocation of Resources Without Limits or Throttling.
Which quic-go versions are affected?
Affected versions include releases prior to 0.59.1 across affected packages: github.com/quic-go/quic-go.
What version fixes CVE-2026-40898?
Upgrading to 0.59.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/quic-go/quic-go affected?
Yes, github.com/quic-go/quic-go is affected in releases prior to 0.59.1. Upgrade your dependency to 0.59.1 or later.
What is the CVSS score of CVE-2026-40898?
CVE-2026-40898 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-40898?
CVE-2026-40898 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Go dependencies for CVE-2026-40898?
Run the dependency tree command: 'inspect dependencies for github.com/quic-go/quic-go'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vvgj-x9jq-8cj9",
  "modified" : "2026-06-09T11:54:12Z",
  "published" : "2026-06-03T20:59:49Z",
  "aliases" : [ "CVE-2026-40898" ],
  "summary" : "quic-go: HTTP/3 QPACK Trailer Expansion Memory Exhaustion ",
  "details" : "## Summary\n\nAn 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.\n\nThis is very similar to CVE-2025-64702. The difference is that this issue uses HTTP trailers, rather than HTTP headers, as the attack vector.\n\n## Impact\n\nA 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.\n\n## Details\n\nIn 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`.\n\n`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.\n\nRFC 9114 requires endpoints to enforce decoded field section size limits via SETTINGS, which quic-go did not do for trailers.\n\n## The Fix\n\nquic-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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/quic-go/quic-go"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.59.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.59.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/quic-go/quic-go/security/advisories/GHSA-vvgj-x9jq-8cj9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40898"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/quic-go/quic-go/pull/5642"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/quic-go/quic-go/commit/c56e8c79d1627cc1ed6005b421b4b0adadd83665"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-g754-hx8w-x2g6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/quic-go/quic-go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/quic-go/quic-go/releases/tag/v0.59.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-03T20:59:49Z",
    "nvd_published_at" : "2026-06-04T19:16:28Z"
  }
}