Netty's HTTP/3 decoder enforces the QPACK blocked-streams ceiling with if (blockedStreamsCount == maxBlockedStreams - 1) throw MAX_BLOCKED_STREAMS_EXCEEDED, inside QpackDecoder.shouldWaitForDynamicTableUpdates. maxBlockedStreams is a signed int set from the operator's HTTP3_SETTINGS_QPACK_BLOCKED_STREAMS value, defaulting to zero when not configured. blockedStreamsCount is a non-negative counter that starts at zero and is only incremented in the vulnerable code. At the default, the check tests for blockedStreamsCount == -1, which never holds. RFC 9204 § 2.1.2 reads: "If the decoder encounters more blocked streams than it promised to support, it MUST treat this as a connection error of type QPACK_DECOMPRESSION_FAILED." The decoder that promised zero produced no error at all.
CVE-2026-48748: Netty's QPACK Blocked-Streams Limit Tests `count == max - 1`. At The Spec Default Of `max = 0`, That's `count == -1`.
vendor
pattern
cve
proof of concept
The limit check that tested negative one
Netty's HTTP/3 codec shipped with 4.2.0.Final and brought its own QPACK decoder, io.netty.handler.codec.http3.QpackDecoder. CVE-2026-48748 names that decoder. It holds a counter, blockedStreamsCount, tracking how many request streams are presently parked because their Required Insert Count is ahead of the dynamic table. It also holds a ceiling, maxBlockedStreams, the value the server promises its peer over the HTTP/3 settings stream.
The pre-patch gate, on line 483 of QpackDecoder.java:
private boolean shouldWaitForDynamicTableUpdates(int requiredInsertCount) throws QpackException {
if (requiredInsertCount > dynamicTable.insertCount()) {
if (blockedStreamsCount == maxBlockedStreams - 1) {
throw MAX_BLOCKED_STREAMS_EXCEEDED;
}
return true;
}
return false;
}maxBlockedStreams is plumbed from the operator's settings in Http3ConnectionHandler.java:
int maxBlockedStreams = toIntExact(localSettings
.settings()
.getOrDefault(
Http3SettingIdentifier.HTTP3_SETTINGS_QPACK_BLOCKED_STREAMS.id(),
0L)
);
qpackDecoder = new QpackDecoder(maxTableCapacity, maxBlockedStreams);The default is 0L. Any operator who sets HTTP3_SETTINGS_QPACK_MAX_TABLE_CAPACITY to a non-zero value, to enable dynamic-table compression in the first place, and who does not explicitly set HTTP3_SETTINGS_QPACK_BLOCKED_STREAMS, ships a decoder built with maxBlockedStreams = 0.
At maxBlockedStreams = 0, the comparand is 0 - 1 == -1. blockedStreamsCount is a non-negative int that starts at zero and is only incremented in this function path. It never equals -1. Every blocking header block returns true from shouldWaitForDynamicTableUpdates, walks past the throw, and is recorded in the per-decoder state:
if (shouldWaitForDynamicTableUpdates(requiredInsertCount)) {
blockedStreamsCount++;
blockedStreams.computeIfAbsent(requiredInsertCount, __ -> new ArrayList<>(2)).add(whenDecoded);The promise the decoder made on the wire was zero blocked streams. The check that was supposed to enforce that promise tested for a counter value the counter cannot hold.
The counter that only went up
The other half of CVE-2026-48748 is the bookkeeping that was supposed to keep the counter honest. When the encoder eventually inserts a dynamic-table entry that unblocks a parked stream, sendInsertCountIncrementIfRequired runs the pending resumption callbacks. The pre-patch version reads them from the map:
private void sendInsertCountIncrementIfRequired(QuicStreamChannel qpackDecoderStream) throws QpackException {
final int insertCount = dynamicTable.insertCount();
final List<Runnable> runnables = this.blockedStreams.get(insertCount);
if (runnables != null) {
boolean failed = false;
for (Runnable runnable : runnables) {
try {
runnable.run();
} catch (Exception e) {
failed = true;
logger.error("Failed to resume a blocked stream {}.", runnable, e);
}
}
...
}
...
}blockedStreams.get(insertCount) reads the list. The runnables fire. The map entry stays. blockedStreamsCount is not decremented. The counter only goes up.
Both errors compose with the comparand. For the operator who explicitly set HTTP3_SETTINGS_QPACK_BLOCKED_STREAMS = 100, the check fires when the counter equals 99. The counter never decrements. After 99 lifetime blocked decodes on the connection, the next blocking header block throws QPACK - exceeded max blocked streams, which the codec catches in Http3FrameCodec.decodeHeaders and translates to QPACK_DECOMPRESSION_FAILED, a connection-level error. The operator who configured an explicit limit got a self-DoS by ordinary traffic; the connection dies when the lifetime count of blocking decodes hits 99, not when the concurrent count does.
For the operator who left the default, the check never fires at all. Each blocked decode appends another entry to blockedStreams.computeIfAbsent(requiredInsertCount, __ -> new ArrayList<>(2)).add(whenDecoded), holding a reference to the per-stream ReadResumptionListener passed in as whenDecoded. The map only grows. The JVM heap fills. One QUIC connection, opened by an unauthenticated peer, exhausts the server.
The two-character fix
Commit 75127ca by Violeta Georgieva, "Merge commit from fork," landed June 1, 2026, in Netty 4.2.15.Final. The first hunk:
private boolean shouldWaitForDynamicTableUpdates(int requiredInsertCount) throws QpackException {
if (requiredInsertCount > dynamicTable.insertCount()) {
- if (blockedStreamsCount == maxBlockedStreams - 1) {
+ if (blockedStreamsCount >= maxBlockedStreams) {
throw MAX_BLOCKED_STREAMS_EXCEEDED;
}
return true;
}The arithmetic change is decorative; the operator change is the bug. == was a stand-in for >=, on a counter that does not always pass through every integer in order. The new check throws when blockedStreamsCount >= maxBlockedStreams. At maxBlockedStreams = 0, that is the first blocked decode, which is what RFC 9204 § 2.1.2 required all along.
The second hunk:
private void sendInsertCountIncrementIfRequired(QuicStreamChannel qpackDecoderStream) throws QpackException {
final int insertCount = dynamicTable.insertCount();
- final List<Runnable> runnables = this.blockedStreams.get(insertCount);
+ final List<Runnable> runnables = this.blockedStreams.remove(insertCount);
if (runnables != null) {
+ blockedStreamsCount -= runnables.size();
boolean failed = false;
for (Runnable runnable : runnables) {.get() becomes .remove(). The counter is decremented by the size of the resumed list. The map entry is freed. The bookkeeping the original code never did finally happens.
The encoder made the same off-by-one, in the other direction
The same file, the same compilation unit, the same hand: QpackEncoder.mayNotBlockStream, on line 516:
private boolean mayNotBlockStream() {
return blockedStreams >= maxBlockedStreams - 1;
}The shape is identical to the decoder's check. count == max - 1 versus count >= max - 1. Both substitute max - 1 for max. The decoder used ==, which fires at exactly one value of the counter and fails open at every other value, including the unreachable -1 at the default. The encoder used >=, which fires for any counter at or above max - 1. At maxBlockedStreams = 0, the encoder's check is blockedStreams >= -1, which holds for every non-negative counter, that is, always. The encoder's bug fails closed: it conservatively refuses to insert table references that would cause the peer to block, leaking only compression efficiency. The decoder's bug failed open: it accepted blocking forever, and leaked the heap.
Two implementations of the same arithmetic mistake in two halves of one codec, by the same author, picking opposite default behaviors at the boundary. The encoder's mistake never had a CVE because failing closed is not a vulnerability. This is the limit-check-as-equality shape: a bounded counter compared by == against a single target value, where any deviation in the target's computation, or any path that steps the counter past the target without firing the check, bypasses enforcement.
The suite tested the decoder with maxBlockedStreams = 0 and never tried to block a stream
Pre-patch QpackDecoderTest.java, in the shared setup helper used by every parameterized test:
decoder = new QpackDecoder(maxTableCapacity, 0, table, ackEachInsert());Every test in the suite constructed the decoder with maxBlockedStreams = 0, the exact value at which the limit check is dead. No test in the suite called decoder.decode(...) with a Required Insert Count that exceeded the dynamic table's insertCount(), the precondition that drives the gate in shouldWaitForDynamicTableUpdates. The path with the bug had zero test coverage. The constant 0 was hardcoded in the suite that should have exercised the value at which the constant 0 made the check unreachable.
The patch's same commit adds three new tests in QpackDecoderTest.java:
zeroMaxBlockedStreamsThrowsOnBlockedStream, which asserts that atmaxBlockedStreams = 0a blocking decode throwsQpackException. Pre-patch, this test would have returnedfalsebecause the throw never fired.maxBlockedStreamsLimitEnforced, which asserts the limit fires when the counter reachesmaxBlockedStreams, not atmaxBlockedStreams - 1.blockedStreamsCountReleasedAfterUnblocking, which asserts the counter decrements when streams resume, the property the.get()instead of.remove()formulation never had.
The tests are the disclosure. Each is the smallest input that distinguishes the patched code from the unpatched code. A reader of the diff in isolation gets the same information as a reader of the advisory text.
The spec default was the connection error
RFC 9204, Section 2.1.2: "If the decoder encounters more blocked streams than it promised to support, it MUST treat this as a connection error of type QPACK_DECOMPRESSION_FAILED."
Read carefully. Zero is not a permissive default. Zero is a promise that no streams may block. The first blocking decode is the one that exceeds the promise. The MUST is unambiguous.
The Netty decoder's reading of the same zero was the inverse. count == -1 at the default of maxBlockedStreams = 0 is dead code. A reader of the source could have pulled up RFC 9204 § 2.1.2 and QpackDecoder.shouldWaitForDynamicTableUpdates side by side any time after 4.2.0.Final shipped and observed that the implementation enforced the opposite of what the RFC required at the most common configuration. The CVE-2026-48748 record was not assigned until June 5, 2026, when Violeta Georgieva reported it through the security disclosure process and shipped the fix the same week.
The advisory's mechanism description ends: "Attackers exploiting this can send headers referencing unavailable table entries, forcing streams into indefinite blocking states while the server accumulates ReadResumptionListener objects indefinitely, exhausting heap memory." That is correct, and it is not the part nobody else will say. The part nobody else will say is that the broken check was symmetric across the codec. The encoder picked the safe direction by accident. The decoder picked the unsafe one. Both used max - 1 where the spec used max, both shipped in 4.2.0.Final, both went through the same review, and only one was the CVE.
PoC: GHSA-4grm-h2qv-h6w6
The check that bricked the connection at the explicit max was the check that did nothing at the default; the spec's strictest configuration was the one the implementation refused to enforce.