//nefariousplan

CVE-2026-50020: Netty Expanded `strictLineParsing` Again. Same Flag, Same Decoder, Nine Months.

vendor

patterns

cve

proof of concept

Netty's HttpObjectDecoder skipped every byte for which Character.isISOControl(b) was true before reading the request line. The predicate covers 0x00 through 0x1F. Add Character.isWhitespace(b) and you also get 0x20. That is thirty-three byte values silently consumed before the parser looks at the request line. RFC 9112 §2.2 asks servers to ignore one empty CRLF line preceding the request line, two byte values, paired. CVE-2026-50020 published June 12, 2026 with CVSS 5.3 and CWE-444 HTTP Request Smuggling. The Character.isISOControl(c) || Character.isWhitespace(c) predicate has been in this file since February 2010, sixteen years and four months. The June 1, 2026 patch is the second expansion of a configuration flag named strictLineParsing in HttpObjectDecoder.java in nine months. The first expansion, September 3, 2025, closed a chunked-transfer smuggling primitive in the same decoder. This one closes the leading-control-byte smuggling primitive. Both expansions were authored by the same maintainer, change the default in the safe direction, and leave the unsafe code path reachable through setStrictLineParsing(false).

Character.isISOControl is the wrong predicate for "empty CRLF line"

HttpObjectDecoder's state machine starts in SKIP_CONTROL_CHARS. The LineParser.skipControlChars method walks the buffer looking for the first byte that is neither a control character nor whitespace, using a ByteProcessor whose body is one line:

private static final ByteProcessor SKIP_CONTROL_CHARS_BYTES = new ByteProcessor() {
    @Override
    public boolean process(byte value) {
        return ISO_CONTROL_OR_WHITESPACE[128 + value];
    }
};

ISO_CONTROL_OR_WHITESPACE is a precomputed 256-entry boolean lookup table:

private static final boolean[] ISO_CONTROL_OR_WHITESPACE;

static {
    ISO_CONTROL_OR_WHITESPACE = new boolean[256];
    for (byte b = Byte.MIN_VALUE; b < Byte.MAX_VALUE; b++) {
        ISO_CONTROL_OR_WHITESPACE[128 + b] = Character.isISOControl(b) || isWhitespace(b);
    }
}

Character.isISOControl(int) returns true for codepoints 0x00 through 0x1F and 0x7F through 0x9F. Character.isWhitespace on byte-widened ints adds 0x20. Java's signed byte plus the loop's exclusive upper bound (b < Byte.MAX_VALUE rather than <=) mean the table is set true at indices 128 through 160 and nowhere else. Translated back through the 128 + value lookup, the bytes the decoder skips are 0x00 through 0x20 inclusive, thirty-three byte values. 0x7F is excluded by the loop's off-by-one: index 255 is never written. The published GitHub advisory lists 0x7F as a skipped byte. The code does not skip it. The advisory describes the predicate the developer thought they wrote.

RFC 9112 §2.2: "In the interest of robustness, a server that is expecting to receive and parse a request-line SHOULD ignore at least one empty line (CRLF) received prior to the request-line." The clause is a robustness allowance for HTTP/1.0 clients that posted a body with a trailing CRLF. It names one byte sequence, CR LF, and constrains the sequence to form an empty line. NUL is not an empty line. SOH is not an empty line. SPACE is not an empty line.

Thirty-three accepted bytes. Two named by the RFC. The other thirty-one are the smuggling surface.

NUL is the smuggle byte the advisory does not name

CWE-444 is HTTP Request/Response Smuggling. The threat model is a parser-differential pair: a front-end proxy (HAProxy, nginx, an L7 load balancer) and a back-end server (Netty) sharing a TCP connection, disagreeing on where one request ends and the next begins.

The smuggle, against pre-patch Netty, is one byte longer than the advisory's threat model description:

POST / HTTP/1.1\r\n
Host: target.example.com\r\n
Content-Length: 39\r\n
\r\n
\x00GET /internal/admin HTTP/1.1\r\n
Host: target.example.com\r\n
\r\n

The front-end reads the POST. Content-Length: 39 matches the thirty-nine bytes that begin with \x00 and end with the second \r\n\r\n. The proxy forwards the headers and the body to the upstream connection, treating the request as complete. By the proxy's accounting one request crossed the boundary.

Netty reads the POST, consumes the thirty-nine-byte body, then re-enters SKIP_CONTROL_CHARS to look for the next request on the keepalive connection. The first byte on the wire is \x00. ISO_CONTROL_OR_WHITESPACE[128 + 0] is true. The decoder advances past it. The next bytes spell GET /internal/admin HTTP/1.1. Netty parses a second request whose Host and target the proxy never authorized, never logged, and never rate-limited. The proxy's access log records one POST. Netty's logs record one POST and one GET.

The proxy did not have to be misconfigured. It only had to use Content-Length to delineate the request body the way every HTTP/1.1 proxy does, and to forward the body bytes verbatim. The smuggle byte does not have to be NUL. SOH, STX, ETX, BS, VT, FF, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, FS, GS, RS, US, and SPACE all reach the same forEachByte walk and all return true from the same lookup. Pre-patch Netty has no opinion on which of the thirty-one not-named-by-RFC bytes prefixed the smuggled request. Any of them is the front of a chain.

The patch did not change the bytes. It changed which knob decides.

Commit aa0cae5a91, June 1, 2026, "HttpObjectDecoder skips arbitrary initial control characters when only initial CRLF characters are permitted." The diff renames the entry state from SKIP_CONTROL_CHARS to SKIP_INITIAL_LINE_CHARS, rewrites skipControlChars as skipLineChars, and adds a Runnable strictCRLFCheck parameter:

-        private boolean skipControlChars(ByteBuf buffer, int readableBytes, int readerIndex) {
-            assert currentState == State.SKIP_CONTROL_CHARS;
+        private boolean skipLineChars(ByteBuf buffer, int readableBytes, int readerIndex, Runnable strictCRLFCheck) {
+            assert currentState == State.SKIP_INITIAL_LINE_CHARS;
             final int maxToSkip = Math.min(maxLength, readableBytes);
-            final int firstNonControlIndex = buffer.forEachByte(readerIndex, maxToSkip, SKIP_CONTROL_CHARS_BYTES);
-            if (firstNonControlIndex == -1) {
+            final int firstNonLineIndex = buffer.forEachByte(readerIndex, maxToSkip,
+                    strictCRLFCheck == null ? SKIP_CONTROL_CHARS_BYTES : ByteProcessor.FIND_NON_CRLF);
+            if (firstNonLineIndex == -1) {
                 buffer.skipBytes(maxToSkip);
                 ...
                 return true;
             }
+            if (strictCRLFCheck != null) {
+                final int b = buffer.getByte(firstNonLineIndex) & 0xFF;
+                if (Character.isISOControl(b)) {
+                    strictCRLFCheck.run();
+                }
+            }

strictCRLFCheck is THROW_INVALID_LINE_SEPARATOR, a Runnable that throws InvalidLineSeparatorException. It is set on the decoder if and only if HttpDecoderConfig.isStrictLineParsing() returns true. The default value of strictLineParsing is true. A fresh HttpRequestDecoder() constructed against the default config in 4.1.135 or 4.2.15 refuses a leading NUL byte and the smuggling primitive is closed.

The unsafe predicate is still in the source. The ternary strictCRLFCheck == null ? SKIP_CONTROL_CHARS_BYTES : ByteProcessor.FIND_NON_CRLF calls out exactly the condition that keeps the lookup table reachable. When an operator wires new HttpDecoderConfig().setStrictLineParsing(false), or runs the JVM with -Dio.netty.handler.codec.http.defaultStrictLineParsing=false (a system property the same maintainer added in the September 2025 commit specifically to give legacy users an opt-out), the patched code path constructs no strictCRLFCheck, walks the buffer with SKIP_CONTROL_CHARS_BYTES, and skips the same thirty-one not-named-by-RFC bytes the pre-patch code did. The NUL-prefix smuggle still works against a 4.1.135 server that opted out.

This is the Safe Mode Was Opt In shape applied in reverse. The patch removes the primitive from the default. It does not remove the primitive from the codebase. The bytes are still in the lookup table. The lookup table is still wired to the same ByteProcessor. The ByteProcessor is still called from forEachByte. The configuration flag is the gate, and the unsafe path is one setStrictLineParsing(false) away from any operator who set it a year ago for legacy-client compatibility and never revisited the call site.

strictLineParsing has been expanded twice in nine months

The flag was not coined for CVE-2026-50020. Commit edb55fd8e0, September 3, 2025, "Merge commit from fork (#15611)", motivation:

Transfer-Encoding: chunked has some strict rules around parsing CR LF delimiters. If we are too lenient, it can cause request/response smuggling issues when combined with proxies that are lenient in different ways. See https://w4ke.info/2025/06/18/funky-chunks.html for the details.

That commit introduced strictLineParsing and THROW_INVALID_LINE_SEPARATOR, made strict CR LF the default for chunk extensions and header line separators, and shipped the system property opt-out. The fix scope was lone-LF acceptance in header lines and chunk extensions. The June 2025 funky-chunks writeup the commit references is a parser-differential smuggling analysis of Transfer-Encoding: chunked.

Nine months later, the June 1, 2026 commit's motivation reads:

RFC 9112 permit empty lines (CR LF sequences) prior to the request line, but we were skipping over any ISO control characters. This is parsing leniency beyond what the standard mandates and can be a security liability.

The June 2026 commit borrows the September 2025 commit's framing. The mechanism is the same. A parser leniency in HttpObjectDecoder was paired with a downstream proxy that disagreed about which bytes count as message boundaries. The fix was to expand strictLineParsing to cover the new code path, make the strict behavior the default, and keep the lenient code reachable through configuration.

Both commits were authored by Norman Maurer, Netty's lead maintainer. Both add a state transition to the same LineParser. Both reference the same THROW_INVALID_LINE_SEPARATOR runnable. Both leave the unsafe code path in the file. The September 2025 commit's title says "Enforce CR LF line separators for HTTP messages by default." The June 2026 commit's diff comment says "Additionally, Netty will enforce that only CR LF characters precede the initial line, if any." The word the second commit adds is "Additionally."

This is the design-debt-driver shape. The substrate is the parser leniency the file was written to provide. Every byte-level leniency HttpObjectDecoder ships is a candidate to be paired with a downstream proxy that disagrees, and every such pairing becomes a smuggling primitive. The September 2025 patch and the June 2026 patch are the same fix shape, by the same maintainer, with the same flag. The count of strictLineParsing expansions, after nine months, is two.

The pattern repeats in the same component because the component is a parser written to be lenient. Lenient parsers paired with strict proxies are smuggling primitives by construction. There is no reason to assume the count is two forever; HttpObjectDecoder has 1,400 lines of parsing leniencies, and strictLineParsing currently gates three of them. The next CVE in this file is the next leniency a proxy author disagrees with.

The predicate is sixteen years old

The skip routine carrying Character.isISOControl(c) || Character.isWhitespace(c) has been in this codec since at least February 19, 2010. In commit de8671df93 (the import that initialized the JBoss-Netty codebase under its Apache 2.0 license header), org.jboss.netty.handler.codec.http.HttpMessageDecoder carries this method:

private void skipControlCharacters(ChannelBuffer buffer) {
    for (;;) {
        char c = (char) buffer.readUnsignedByte();
        if (!Character.isISOControl(c) &&
            !Character.isWhitespace(c)) {
            buffer.readerIndex(buffer.readerIndex() - 1);
            break;
        }
    }
}

The 2010 version reads readUnsignedByte() and casts to char, which means 0x7F (DEL) passes Character.isISOControl and is skipped. The predicate moved into io.netty.handler.codec.http.HttpObjectDecoder during the Netty 4 transition. It was refactored in March 2020 (commit 0fb58d3c54, "HttpObjectDecoder should limit the number of control chars") to bound the byte count against maxInitialLineLength. The 2020 motivation was a denial-of-service concern about unbounded skipping; the predicate was not the subject. The refactor moved the predicate into the precomputed ISO_CONTROL_OR_WHITESPACE lookup table that the 2026 patch did not modify, and introduced the b < Byte.MAX_VALUE off-by-one that silently dropped 0x7F from the skipped set.

Sixteen years and four months. The 2010 method, the 2020 refactor, the 2025 chunk-smuggle fix, and the 2026 prefix-skip fix were all authored by the same maintainer. The strictLineParsing flag, the THROW_INVALID_LINE_SEPARATOR runnable, and the system-property opt-out are all in one person's commit history. The pattern is not adversarial. The component is fertile.

Netty is the substrate underneath Reactor Netty, Spring WebFlux, Vert.x, gRPC-Java, Cassandra's client driver, Elasticsearch's transport, Kafka's network layer, and effectively every modern JVM HTTP framework. Every operator who runs Netty 4.1.0 through 4.1.134 or 4.2.0 through 4.2.14 behind a proxy is in the affected set. Every operator who runs 4.1.135 or 4.2.15 with setStrictLineParsing(false) in their stack, set by a vendor a year ago for compatibility with a legacy client that posted lone-LF separators, remains in the affected set.

The PoC on the GHSA is the patched regression test:

ByteBuf buf = Unpooled.buffer();
buf.writeByte(0x00);   // NUL, not an empty CRLF line
buf.writeByte(0x01);   // SOH, not an empty CRLF line
buf.writeCharSequence(
        "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n",
        CharsetUtil.US_ASCII);
channel.writeInbound(buf);
HttpRequest req = channel.readInbound();
assertTrue(req.decoderResult().isFailure(),
        "Non-CRLF control bytes before the request-line must not be silently skipped");

Two bytes. NUL and SOH. The maintainer wrote the regression test the same week he wrote the patch. The advisory's "Silently absorbing NUL bytes, SOH, STX, and other non-CRLF control characters" wording is the test case as English. The bytes were in the file for sixteen years before someone wrote them down.

PoC: GHSA-hvcg-qmg6-jm4c

strictLineParsing is the name of a substrate. It will be expanded again.