The vulnerability exists in how the quic-go library handles HTTP/3 header decompression using QPACK. The core issue is that the library only enforced a size limit on the compressed HEADERS frame, but not on the decompressed size of the header fields. An attacker could craft a small, highly compressed HEADERS frame that, upon decompression, expands to an extremely large size (e.g., by referencing many large entries in the QPACK static table). This would cause the application to allocate an excessive amount of memory, leading to a denial-of-service (DoS) attack.
The vulnerability resided in the internal http3.parseHeaders function, which did not check the size of the decoded output. This function was called by http3.requestFromHeaders (on the server side) and http3.updateResponseFromHeaders (on the client side). The publicly exposed methods that trigger this vulnerable path are (*http3.Server).handleRequest for servers and (*http3.RequestStream).ReadResponse for clients.
The patch addresses this by introducing a sizeLimit that is passed down through the call chain to parseHeaders. This function now incrementally checks the size of the decoded headers against the limit and aborts the connection if the limit is exceeded, thus preventing the excessive memory allocation.