Introduction
A Netty server that frames inbound TCP traffic with a NUL byte or a custom delimiter can be pushed into quadratic CPU work by a remote peer that never authenticates and simply never sends the delimiter. Because Netty sits underneath messaging clients, identity servers, data grids and integration platforms, Red Hat lists twelve of its own products as affected by CVE-2026-142444, which carries a CVSS v3.1 score of 7.5 (High) and a Red Hat severity of Important.
Netty is an asynchronous, event-driven network application framework for building high-performance protocol servers and clients, distributed under the Apache License 2.0 and maintained by volunteers on a reasonable-effort basis. It is usually consumed as an embedded dependency rather than deployed directly. Apache Camel builds its TCP and UDP socket component on Netty 4, and IBM has published bulletins addressing Netty issues in webMethods products. That embedded role means a flaw in a single Netty codec can surface across many downstream products, although real exposure always depends on which decoder an application actually wires into its pipeline.
Technical information
Root cause: a decoder with no memory
DelimiterBasedFrameDecoder splits an inbound byte stream into frames using one or more configured delimiters. Netty already handles the common \n and \r\n case with LineBasedFrameDecoder, which remembers how far it has scanned. The generic branch, used for Delimiters.nulDelimiter() or any custom delimiter, kept no such state.
On every decode() call, that generic branch ran ByteBufUtil.indexOf for each configured delimiter across the whole accumulated buffer, starting at the reader index. When no delimiter was present, nothing was recorded about the bytes already examined, so the next call searched them again. If a peer sends delimiter-free data one byte per TCP segment, each new byte triggers a full rescan of everything buffered so far. Summed over the connection, that is O(n²) work, capped only by maxFrameLength.
maxFrameLength does not prevent the issue. Red Hat's tracker states that the quadratic work occurs up to that limit. The result is CPU exhaustion that can saturate Netty event loop threads. It does not involve memory corruption or code execution.
A second quadratic pattern with multiple delimiters
The upstream fix also addresses a related inefficiency. With several delimiters configured, the old loop searched the entire remaining buffer for every delimiter, even when another delimiter matched at the very start. A large buffer full of tiny frames therefore cost O(buffer) per frame extracted, which again scales quadratically with input size.
Attack flow
Based on the public Bugzilla description, the sequence looks like this:
- The attacker connects to a network listener whose pipeline uses
DelimiterBasedFrameDecoderwithDelimiters.nulDelimiter()or a custom delimiter other than line endings. No credentials or user interaction are needed. - The attacker sends data that never contains the configured delimiter, split across many small TCP segments.
- Each arriving fragment causes
decode()to search the full, ever-growing accumulated buffer from the reader index for every delimiter. - CPU cost per fragment grows linearly with the buffered size, so total cost grows quadratically until
maxFrameLengthis reached. - Event loop threads spend their time rescanning, and other connections served by those threads stop making progress, producing a denial of service.
The published vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H: network reachable, low complexity, no privileges, no user interaction, unchanged scope, and high availability impact only. NVD attributes the score to Red Hat. The primary weakness is CWE-400 (Uncontrolled Resource Consumption), and Bugzilla additionally lists CWE-407. The reviewed descriptions do not supply attack bandwidth, fragment counts, an amplification ratio or a time to failure.
Exploitation status
The Red Hat advisory, the CVE record and Bugzilla describe a possible unauthenticated attack, but none of them documents exploitation in the wild, a named threat actor or a campaign. No standalone public reproducer was identified, and CISA KEV status was not confirmed. The CVE record contains an entry named Red Hat Exploit Intelligence with a default affected status inside its product structure. That entry is not a statement that exploitation has been observed.
Patch information
Red Hat's tracker (Bugzilla 2588736) lists the fix in io.netty:netty-codec-base 4.2.19.Final and io.netty:netty-codec 4.1.139.Final. The upstream advisory is GHSA-5h6f-wp3f-6hmv. The 4.2 fix is commit 85498e0, Fix quadratic scanning in DelimiterBasedFrameDecoder for non line delimiters, by Norman Maurer, merged through the bulk PR #17770, which is assigned to the 4.2.19.Final milestone. We did not review the matching 4.1 backport commit. The 4.1.139.Final version comes from Red Hat's tracker. Netty announced 4.1.139.Final as a bug fix and security release on October 6, 2026. That announcement used placeholder CVE identifiers because of strain on CVE infrastructure, so the CVE-to-version mapping here relies on Bugzilla.
Part 1: remember where the scan stopped
The patch adds a scanOffset field, mirroring the approach LineBasedFrameDecoder already uses:
/** * Last scan position, relative to the reader index, at which no delimiter could be found. * Resuming from this offset avoids rescanning the whole buffer from the reader index on * every {@link #decode(ChannelHandlerContext, ByteBuf)} call. */ private int scanOffset;
The constructor also computes the longest configured delimiter once (maxDelimiterLength). The no-delimiter-found branch now saves its progress:
} else { + } else { + // No delimiter found yet. Remember how far we've already scanned so the next + // call doesn't rescan bytes that cannot possibly contain the start of a match. + scanOffset = Math.max(0, readableBytes - maxDelimiterLength + 1); }
A delimiter of length L that is not yet complete can only begin within the last L minus 1 bytes of the buffer. Anything earlier has already been checked and ruled out. Resuming from that point means each byte is scanned a constant number of times, and a delimiter split across two reads is still found. scanOffset resets to 0 whenever bytes are consumed: when a delimiter is found, when an oversized frame starts being discarded, and while discarding continues. This keeps the offset relative to the current reader index.
Part 2: windowed search across multiple delimiters
The old private indexOf helper was removed and replaced with a windowed search. With one delimiter, the window is the whole buffer. With more than one, the window starts at INITIAL_SCAN_WINDOW = 64 bytes and doubles on each pass:
long window = delimiters.length == 1 ? readableBytes : Math.max(INITIAL_SCAN_WINDOW, maxDelimiterLength); int from = scanOffset; while (from < readableBytes) { // Extend the region by maxDelimiterLength - 1 so a delimiter that starts inside the window but ends // after it is still found. int end = (int) Math.min(readableBytes, from + window + maxDelimiterLength - 1); ByteBuf region = buffer.slice(buffer.readerIndex() + from, end - from);
Consecutive regions overlap by maxDelimiterLength minus one bytes, so a match crossing a window edge is not missed. The loop stops early only when the shortest match found so far begins inside the current window rather than only in the overlap. That preserves the original rule that the delimiter producing the shortest frame wins, while making the cost depend on the size of the frame found instead of the size of the buffer.
Regression tests
The commit adds four tests to DelimiterBasedFrameDecoderTest:
testDripFeedWithoutDelimiterDoesNotScaleQuadraticallyreproduces the attack by feeding NUL-delimited input one byte at a time and asserting that 8× more input takes less than 24× longer (linear growth is roughly 8×, quadratic roughly 64×).testManyFramesInOneBufferWithMultipleDelimitersDoesNotScaleQuadraticallyapplies the same timing check to the multiple-delimiter case.testMultiByteDelimiterFoundAcrossResumedScanBoundarysends a###delimiter one byte at a time and checks that the resume point never skips a delimiter straddling the previous scan boundary.testMultipleDelimitersChooseShortestFrameAcrossWindowBoundarieschecks that the windowed search selects the same delimiter a full search would.
Related follow-up: partial delimiter handling (#17665)
Commit 07aed99 touches the same branch but fixes a separate correctness bug rather than the CPU issue. When a multibyte delimiter was split across reads, its leading bytes could be counted toward the frame length, or thrown away while discarding an oversized frame, which could cause frames to be lost. The fix introduces partialDelimiterLength() so a trailing partial delimiter is neither counted nor skipped, and the maxFrameLength comparison now uses the frame bytes excluding that partial delimiter. The current 4.2 branch source contains both the scanOffset and windowed search fix and this partial delimiter handling.
Workarounds and their limits
Red Hat's CVE page states that mitigation is either unavailable or does not meet its Product Security criteria. Applications already using LineBasedFrameDecoder are outside the affected path, but the sources do not recommend converting a NUL or custom delimited protocol to line framing as a general workaround. Netty's threat model asks codecs to bound CPU expenditure relative to input size, which is the principle this patch implements, yet no CVE-specific frame length, timeout, rate limit or firewall rule is published as a substitute for upgrading. The documented corrective action is the fixed artifact version.
Affected systems and versions
Upstream artifacts, per Red Hat Bugzilla 2588736:
io.netty:netty-codec-base: 4.2.0.Final through 4.2.18.Final are affected. Fixed in 4.2.19.Final.io.netty:netty-codec: all versions up to and including 4.1.138.Final are affected (no lower bound is stated). Fixed in 4.1.139.Final.
Vulnerable configuration: DelimiterBasedFrameDecoder using Delimiters.nulDelimiter() or any custom delimiter other than line endings, on a channel that accepts untrusted input. Line-delimited framing via LineBasedFrameDecoder is identified as unaffected, so the same application can host both affected and unaffected pipelines.
The 4.2.18.Final and 4.1.138.Final releases, which fixed the earlier HTTP pipelining queue issue, still fall inside the affected ranges for this CVE.
Red Hat products listed as affected in the CVE record (distributor assessments with an all-versions default status, not proof that every installation exposes a vulnerable listener):
- Red Hat AMQ Clients
- Red Hat build of Apache Camel for Spring Boot 4
- Red Hat build of Apicurio Registry 3
- Red Hat build of Debezium 3
- Red Hat Build of Keycloak
- Red Hat Data Grid 8
- Red Hat JBoss Enterprise Application Platform 8
- Red Hat JBoss Enterprise Application Platform Expansion Pack
- Red Hat OpenShift AI
- Red Hat OpenShift Dev Spaces
- Red Hat Satellite 6
- streams for Apache Kafka 3
Listed as unaffected: OpenShift Serverless, Red Hat AMQ Broker 7, Red Hat build of Apache Camel 4 for Quarkus 3, and Red Hat build of Quarkus. The reviewed sources do not provide product-specific fixed builds, and the upstream component versions above should not be read as product build numbers.
Vendor security history
Decoder performance in this exact class has come up before. Netty issue 13321, opened on April 7, 2023, included a thread sample showing 79.15% CPU usage in DelimiterBasedFrameDecoder.indexOf. A maintainer suggested a faster search while cautioning that existing behavior had to be preserved, and the issue was closed as fixed by PR 13451. The sources do not establish that this was the same defect as CVE-2026-142444, and the current affected ranges show that the earlier optimization did not remove the rescanning behavior.
Two other recent Netty availability advisories exhaust a different resource and have their own fixes:
- CVE-2025-58057 (published September 3, 2025): crafted compressed input keeps decompression buffers reachable, causing memory exhaustion. Fixed in
netty-codec4.1.125.Final andnetty-codec-compression4.2.5.Final. - GHSA-pvjx-v7vp-62vq (published September 10, 2026): HTTP/1.1 pipelining grows an unbounded per-connection method queue in
HttpServerCodec, causing memory exhaustion. Fixed in 4.2.18.Final and 4.1.138.Final.
These fixes are not interchangeable with the delimiter fix. On process, Netty requests private reports through GitHub security advisories with a 90-day remediation window, ships security updates on the 4.1 and 4.2 branches, and states that 4.1 reaches end of life on July 1, 2027, which is worth factoring into upgrade planning alongside this CVE.
References
- NVD: CVE-2026-142444
- CVE Record: CVE-2026-142444
- Red Hat Customer Portal: CVE-2026-142444
- Red Hat Bugzilla 2588736
- Netty commit 85498e0: Fix quadratic scanning in DelimiterBasedFrameDecoder
- Netty commit 85498e0 (patch file)
- Netty PR #17770 (GitHub API)
- Netty commit 07aed99: partial delimiter handling
- Netty commit 07aed99 (GitHub API)
- DelimiterBasedFrameDecoder.java on the 4.2 branch
- DelimiterBasedFrameDecoder source xref (4.2)
- Netty 4.1.139.Final release announcement
- Netty threat model
- Netty downloads
- Netty GitHub repository
- Netty security overview
- Netty security advisories
- Netty releases
- Netty issue 13321: high CPU in DelimiterBasedFrameDecoder
- CVE-2025-58057 advisory (GHSA-3p8m-j85q-pgmj)
- GHSA-pvjx-v7vp-62vq: HttpServerCodec pipelining queue growth
- IBM Security Bulletin: Netty in webMethods API Management
- Apache Camel Netty component
- CISA Known Exploited Vulnerabilities Catalog



