CVE-2026-142447: io.netty:netty-handler-ssl-ocsp Vulnerability

CVE-2026-142447

NVD

Vulnerability Summary

Summary `io.netty:netty-handler-ssl-ocsp`'s `OcspServerCertificateValidator` is meant to hold off application traffic until OCSP says the peer certificate is valid. CVE-2026-56822 / the parent-class change from `ChannelInboundHandlerAdapter` to `ByteToMessageDecoder` stopped `channelRead` from forwarding bytes during the query (`decode()` is a no-op that only accumulates). In the current code (4.2.18) the listener `finally` still calls `ctx.pipeline().remove(this)` unconditionally. Removal runs `ByteToMessageDecoder.handlerRemoved()`, which fires the buffered `cumulation` downstream. When the status is `REVOKED` and `closeAndThrowIfNotValid=true` (default), `ctx.close()` only schedules `fireChannelInactive` on a later event-loop task (`invokeLater` → `eventLoop().execute()`), so the `fireChannelRead` of revoked-peer data happens first. Details The original CVE-2026-56822 issue was classic TOCTOU: `ChannelInboundHandlerAdapter.channelRead()` passed TLS-decrypted bytes through before OCSP finished. The patch made the handler a `ByteToMessageDecoder` whose `decode()` does nothing, so inbound bytes sit in `cumulation` until the handler is removed. pom.xml revapi records `java.class.nonFinalClassInheritsFromNewClass` with `superClass=io.netty.handler.codec.ByteToMessageDecoder`. The remaining hole is the listener `finally` in `userEventTriggered()`: it always forwards `SslHandshakeCompletionEvent` and then `ctx.pipeline().remove(this)`. `ByteToMessageDecoder.handlerRemoved()` is `final`; with readable cumulation it does `ctx.fireChannelRead(buf)` then `fireChannelReadComplete()`. `OcspServerCertificateValidator` does not override `handlerRemoved0()` to drop the buffer on failure. When OCSP returns REVOKED and `closeAndThrowIfNotValid` is true: 1. `ctx.close()` runs `AbstractChannel.AbstractUnsafe.close()` → `doClose0()` then `fireChannelInactiveAndDeregister()` → `deregister()` → `invokeLater()` → `eventLoop().execute(task)` so `pipeline.fireChannelInactive()` is a later cycle. 2. `ctx.close()` returns. 3. `finally` runs synchronously: `remove(this)` → `handlerRemoved()` → `fireChannelRead(buf)` of the banner / first application record from the revoked peer. 4. The next handler's `channelRead` runs in the same stack. 5. Only afterwards does `fireChannelInactive` run — too late. The patch moved the race from "use before check" to "use after check, before close". The window is smaller but still exploitable under default `closeAndThrowIfNotValid=true` / `autoRead=true`. Typical triggers are protocols that send a server banner right after the handshake (SMTP / FTP / IMAP / POP3). Vulnerable code `src/handler-ssl-ocsp/src/main/java/io/netty/handler/ssl/ocsp/OcspServerCertificateValidator.java` (lines 157–159, 215–237) — decode only buffers; REVOKED closes asynchronously then `finally` always removes the handler: ```java protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) { // Just buffer until the handler is removed which will happen once we did finish the OCSP processing. } if (status != OcspResponse.Status.VALID && closeAndThrowIfNotValid) { ctx.fireExceptionCaught(new OCSPException( "Certificate not valid. Status: " + status)); ctx.close(); } } finally { ctx.fireUserEventTriggered(evt); ctx.pipeline().remove(this); ``` `src/codec-base/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java` (lines 258–276) — removal flushes cumulation to the next handler: ```java public final void handlerRemoved(ChannelHandlerContext ctx) throws Exception { ... ByteBuf buf = cumulation; if (buf != null) { cumulation = null; ... if (readable > 0) { ctx.fireChannelRead(buf); ctx.fireChannelReadComplete(); } else { buf.release(); } } handlerRemoved0(ctx); } ``` PoC API recipe (component library; the entry point is any TLS client that installs `OcspServerCertificateValidator` after `SslHandler`): ```java // 1. Same buffering contract as OcspServerCertificateValidator.decode(): accumulate, emit nothing. static class OcspValidatorSimulator extends ByteToMessageDecoder { @Override protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) { // no-op — buffer only } } // 2. Pipeline: [validator] → [capture] EmbeddedChannel channel = new EmbeddedChannel(validator, capture); // 3. Application data that arrived while OCSP was in flight (e.g. SMTP banner from a revoked peer): channel.writeInbound(Unpooled.copiedBuffer("220 SMTP Service Ready\r\n", UTF_8)); // capture has not seen the banner yet. // 4. Simulate the finally block: ctx.pipeline().remove(this) channel.pipeline().remove(validator); // ByteToMessageDecoder.handlerRemoved() fires ctx.fireChannelRead(buf); // capture receives "220 SMTP Service Ready\r\n" — data from the revoked server. // 5. Control: in real Netty, ctx.close() on REVOKED is async (invokeLater), so this // fireChannelRead runs before pipeline.fireChannelInactive(). ``` Impact The documented OCSP fail-closed posture after CVE-2026-56822 is bypassed: a TLS server with a revoked certificate can still deliver at least the first application records (banners, early responses) into the client pipeline. That re-enables man-in-the-middle use of revoked certificates against clients that enabled `OcspServerCertificateValidator` specifically to stop that. The trigger is unauthenticated from the client's point of view — any completed handshake against a revoked peer that speaks first after TLS is enough; default `closeAndThrowIfNotValid=true` is the vulnerable configuration.
Severity Level
HIGH(8.3)
Published Date
Dec 2, 2026
Last Modified
Dec 2, 2026
Exploitation Status
No confirmed exploitation yet
CVE Record Status
Reserved
This CVE ID is referenced in a public advisory, but the CVE Program has not published its official CVE Record yet. Full CVSS/CPE data from NVD will appear here once it does.
Root Weakness (CWE)
The product checks the state of a resource before using that resource, but the resource state can change between the check and the use in a way that invalidates the results of the check.
CVSS v4.0 Base Metrics — Score 8.3
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
Attack VectorNetwork
Attack ComplexityHigh
Attack RequirementsNone
Privileges RequiredNone
User InteractionNone
Confidentiality (Vulnerable System)Low
Integrity (Vulnerable System)High
Availability (Vulnerable System)None
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None

Affected & Patched Versions

Affected Versions
  • io.netty:netty-handler-ssl-ocsp >= 4.2.0.Final, <= 4.2.18.Final
  • io.netty:netty-handler-ssl-ocsp <= 4.1.138.Final
Patched Versions
  • io.netty:netty-handler-ssl-ocsp 4.2.19.Final
  • io.netty:netty-handler-ssl-ocsp 4.1.139.Final

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run io.netty:netty-handler-ssl-ocsp and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • Dec 2, 2026Published
  • Dec 2, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new io.netty:netty-handler-ssl-ocsp CVEsYou are reading CVE-2026-142447. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Dec 3, 2026 14:02 UTC