Vulnerabilities

6 via 54 paths

Dependencies

53

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Severity
  • 5
  • 1
Status
  • 6
  • 0
  • 0

high severity
new

Null Byte Interaction Error (Poison Null Byte)

  • Vulnerable module: io.netty:netty-codec-dns
  • Introduced through: io.ratpack:ratpack-core@1.9.0 and io.ratpack:ratpack-guice@1.9.0

Detailed paths

  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final

Overview

Affected versions of this package are vulnerable to Null Byte Interaction Error (Poison Null Byte) due to inadequate validation of domain name labels and lengths in the encodeDomainName and decodeDomainName components. An attacker can cause DNS cache poisoning, bypass domain validation, or trigger excessive memory allocation by supplying specially crafted domain names or malicious DNS responses. This can result in downstream failures, silent truncation of domain names, and parser confusion across different DNS implementations.

Remediation

Upgrade io.netty:netty-codec-dns to version 4.1.133.Final, 4.2.13.Final or higher.

References

high severity
new

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: io.netty:netty-codec
  • Introduced through: io.ratpack:ratpack-core@1.9.0 and io.ratpack:ratpack-guice@1.9.0

Detailed paths

  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final

Overview

io.netty:netty-codec is an event-driven asynchronous network application framework.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in the Lz4FrameDecoder component. An attacker can cause excessive memory allocation by sending specially crafted compressed data with manipulated header fields, leading to resource exhaustion and potential denial of service.

PoC

    @Test
    void test() throws Exception {
        EventLoopGroup workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            AtomicReference<Throwable> serverError = new AtomicReference<>();
            CountDownLatch latch = new CountDownLatch(1);

            ServerBootstrap server = new ServerBootstrap()
                    .group(workerGroup)
                    .channel(NioServerSocketChannel.class)
                    .childHandler(new ChannelInitializer<SocketChannel>() {
                        @Override
                        protected void initChannel(SocketChannel ch) {
                            ch.pipeline()
                                    .addLast(new Lz4FrameDecoder())
                                    .addLast(new ChannelInboundHandlerAdapter() {
                                        @Override
                                        public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
                                            if (cause instanceof DecoderException) {
                                                serverError.set(cause.getCause());
                                            } else {
                                                serverError.set(cause);
                                            }
                                            latch.countDown();
                                        }
                                    });
                        }
                    });

            ChannelFuture serverChannel = server.bind(0).sync();

            Bootstrap client = new Bootstrap()
                    .group(workerGroup)
                    .channel(NioSocketChannel.class)
                    .handler(new ChannelInboundHandlerAdapter() {
                        @Override
                        public void channelActive(ChannelHandlerContext ctx) {
                            ByteBuf buf = ctx.alloc().buffer(22, 22);
                            buf.writeLong(MAGIC_NUMBER);
                            buf.writeByte(BLOCK_TYPE_COMPRESSED | 0x0F);
                            buf.writeIntLE(1);
                            buf.writeIntLE(1 << 25);
                            buf.writeIntLE(0);
                            buf.writeByte(0);

                            ctx.writeAndFlush(buf);

                            ctx.fireChannelActive();
                        }
                    });

            ChannelFuture clientChannel = client.connect(serverChannel.channel().localAddress()).sync();

            assertTrue(latch.await(10, TimeUnit.SECONDS));

            assertInstanceOf(IndexOutOfBoundsException.class, serverError.get());

            clientChannel.channel().close();
            serverChannel.channel().close();
        } finally {
            workerGroup.shutdownGracefully();
        }
    }

Remediation

Upgrade io.netty:netty-codec to version 4.1.133.Final or higher.

References

high severity
new

Improper Handling of Highly Compressed Data (Data Amplification)

  • Vulnerable module: io.netty:netty-codec
  • Introduced through: io.ratpack:ratpack-core@1.9.0 and io.ratpack:ratpack-guice@1.9.0

Detailed paths

  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final

Overview

io.netty:netty-codec is an event-driven asynchronous network application framework.

Affected versions of this package are vulnerable to Improper Handling of Highly Compressed Data (Data Amplification) in the HttpContentDecompressor and DelegatingDecompressorFrameListener components when the Content-Encoding header is set to br, zstd, or snappy. An attacker can exhaust system memory and cause a denial of service by sending a highly compressed payload that decompresses to a very large size, bypassing the configured decompression limit.

Remediation

Upgrade io.netty:netty-codec to version 4.1.133.Final or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: io.netty:netty-codec
  • Introduced through: io.ratpack:ratpack-core@1.9.0 and io.ratpack:ratpack-guice@1.9.0

Detailed paths

  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final

Overview

io.netty:netty-codec is an event-driven asynchronous network application framework.

Affected versions of this package are vulnerable to Denial of Service (DoS). SnappyFrameDecoder doesn't restrict chunk length any mad buffer skippable chunks in an unnecessary way, leading to excessive memory usage. This vulnerability can be triggered by supplying malicious input that decompresses to a very big size (via a network stream or a file), or by sending a huge skippable chunk.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade io.netty:netty-codec to version 4.1.68.Final or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: io.netty:netty-codec
  • Introduced through: io.ratpack:ratpack-core@1.9.0 and io.ratpack:ratpack-guice@1.9.0

Detailed paths

  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final io.netty:netty-codec-socks@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-resolver-dns-native-macos@4.1.63.Final io.netty:netty-resolver-dns@4.1.63.Final io.netty:netty-codec-dns@4.1.63.Final io.netty:netty-codec@4.1.63.Final

Overview

io.netty:netty-codec is an event-driven asynchronous network application framework.

Affected versions of this package are vulnerable to Denial of Service (DoS). Bzip2Decoder doesn't allow setting size restrictions for decompressed data. An attacker can exploit this by providing a compressed file that, when decompressed, triggers an out-of-memory exception.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade io.netty:netty-codec to version 4.1.68.Final or higher.

References

medium severity
new

CRLF Injection

  • Vulnerable module: io.netty:netty-handler-proxy
  • Introduced through: io.ratpack:ratpack-core@1.9.0 and io.ratpack:ratpack-guice@1.9.0

Detailed paths

  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final
  • Introduced through: Cantara/ratpack-freemarker@Cantara/ratpack-freemarker io.ratpack:ratpack-guice@1.9.0 io.ratpack:ratpack-core@1.9.0 io.netty:netty-handler-proxy@4.1.63.Final

Overview

Affected versions of this package are vulnerable to CRLF Injection in the newInitialMessage function of HttpProxyHandler when header validation is explicitly disabled and user-influenced outboundHeaders are added without sanitization. An attacker can inject arbitrary HTTP headers into proxy requests by supplying malicious header values containing CRLF sequences.

Notes:

  • This is only exploitable if the application uses HttpProxyHandler with user-influenced outboundHeaders and does not perform its own CRLF sanitization on header values.

  • This is caused due to an incomplete fix for CVE-2025-67735.

PoC

import io.netty.buffer.ByteBuf;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.http.*;
import java.nio.charset.StandardCharsets;

public class HttpProxyHeaderInjectionPoC {
    public static void main(String[] args) {
        System.out.println("=== Netty HttpProxyHandler Header Injection PoC ===\n");

        // Simulate HttpProxyHandler.newInitialMessage() with validation=false
        HttpHeadersFactory headersFactory = DefaultHttpHeadersFactory.headersFactory()
            .withValidation(false);

        FullHttpRequest req = new DefaultFullHttpRequest(
            HttpVersion.HTTP_1_1, HttpMethod.CONNECT,
            "target.com:443",
            io.netty.buffer.Unpooled.EMPTY_BUFFER, headersFactory, headersFactory);

        req.headers().set(HttpHeaderNames.HOST, "target.com:443");

        // Inject CRLF in header value
        String malicious = "1.2.3.4\r\nX-Forwarded-For: 127.0.0.1\r\nX-Admin: true";
        req.headers().set("X-Forwarded-For", malicious);

        // Encode to wire format
        EmbeddedChannel ch = new EmbeddedChannel(new HttpRequestEncoder());
        ch.writeOutbound(req);
        ByteBuf out = ch.readOutbound();
        String encoded = out.toString(StandardCharsets.UTF_8);
        out.release();
        ch.finishAndReleaseAll();

        System.out.println("Wire format:");
        for (String line : encoded.split("\n", -1)) {
            System.out.println("  " + line.replace("\r", "\\r"));
        }
        System.out.println("Injected X-Admin: " + encoded.contains("X-Admin: true"));
        System.out.println("VULNERABLE: " +
            (encoded.contains("X-Admin: true") ? "YES" : "NO"));
    }
}

Remediation

Upgrade io.netty:netty-handler-proxy to version 4.1.133.Final, 4.2.13.Final or higher.

References