The vulnerability is a CRLF injection (CWE-93) in Netty's HTTP codec, which can lead to HTTP request smuggling. The root cause is the lack of input validation on the request URI when creating HttpRequest objects. Specifically, the constructors for DefaultHttpRequest and DefaultFullHttpRequest accepted a URI containing CRLF sequences without sanitization.
The provided patch addresses this by introducing validation logic within the constructors. A new private method, HttpUtil.validateRequestLineTokens, is added to check for illegal characters (including carriage returns and line feeds) in the URI. The constructors for DefaultHttpRequest and DefaultFullHttpRequest are updated to call this validation method.
When an application using a vulnerable Netty version constructs an HTTP request with user-supplied data in the URI, an attacker can inject CRLF sequences. When this malformed request object is passed to io.netty.handler.codec.http.HttpRequestEncoder, the encoder writes the URI, including the injected CRLF sequences, directly to the output buffer. This allows an attacker to craft a single message that is interpreted by a downstream server as two separate HTTP requests, leading to request smuggling.
The identified vulnerable functions are the constructors that were modified by the patch to include the missing validation. These constructors were the entry point for the malicious data.