Contrast ADR now blocks Java4Shell at runtime
Java4Shell is a heap overflow in the Base64 decoder inside OpenJDK 17.0.6 and later, rated 9.2 under CVSS 4.0 and disclosed by Calif on November 17, 2026. It lives in the Java runtime, so SCA and SAST cannot see it. Oracle has shipped fixed builds, but most other JDK vendors have not. Contrast ADR blocks exploit attempts inside the JVM now, so you are protected while you patch.
Oracle patched 11 Java SE vulnerabilities on November 17. One of them is Java4Shell. Calif, the same firm that disclosed PHP2Shell last month, published the details the same morning. The triggering input is only 65 bytes long, and Base64 is how JWTs, HTTP Basic Auth headers and SAML assertions cross the wire. That means the vulnerable decoder runs on untrusted input in nearly every Java service with a login.
OpenJDK replaces the Java implementation of java.util.Base64 with a hand-written x86 intrinsic on CPUs that support AVX-512 VBMI. That includes Intel Ice Lake and newer and AMD Zen 4 and newer. On those CPUs, a crafted 65-byte padded input causes the intrinsic to miscalculate its store mask. It then writes 64 bytes past the end of a 50-byte buffer. Calif reports this can leak memory or lead to unauthenticated remote code execution.
An attacker sends a crafted Base64 string anywhere the application decodes attacker-supplied input. Typical paths include an Authorization header, a JWT segment, a SAML assertion or a file upload. If the JVM has JIT-compiled the decoder, which is true on any busy service, the intrinsic runs and corrupts the heap. A failed attempt usually crashes the JVM. A successful one can give the attacker code execution.
Oracle JDK users can fix this today. Temurin, Corretto, Zulu, Microsoft, Red Hat and the Linux distributions had not shipped a build naming the CVE as of the evening of November 17. Most companies run those free distributions, so many teams face a gap of days. Updating your application does not update the runtime beneath it. JDKs bundled in container images and application distributions will not appear in package manager queries.
There is no vulnerable dependency for SCA to flag and no line of your code for SAST to point at. A clean scan result tells you nothing about this bug. Only runtime inventory by vendor and exact build string tells you where you stand.
A WAF does not know which JDK runs behind it, whether the payload will reach the vectorized decoder, or what the buffer offsets are at execution time. Base64 payloads also arrive in headers, tokens and uploads in many encodings. The decision has to be made at the point of execution, inside the JVM.
Contrast ADR includes a Java4Shell rule in the Contrast Java agent, version 6.38.0 or later. The rule runs where Base64 decoding happens. It first checks the host JDK version and only evaluates inputs on affected runtimes. On a vulnerable JDK, it inspects each decode call for the structural pattern that triggers the overflow.
In block mode, a matching input is stopped before it reaches the vulnerable intrinsic. In monitor mode, the attempt is logged as an attack event. Valid Base64 does not match the signature, so normal traffic passes with no behavioral impact.
ADR is a runtime mitigation that buys you time. Upgrading to a JDK build containing the upstream fix, tracked as JDK-8393212, remains the permanent resolution.
Organizations should follow a disciplined five-step remediation approach:
Runtime bugs outlive the news cycle. JDKs get baked into images that nobody rebuilds, and bundled runtimes sit inside products for years. Attackers know a public crash trigger is a head start for building a working exploit.
The lesson is that vulnerability management cannot stop at the dependency list. Teams need an inventory that includes the runtime, and protection that works at the point of execution. Layering runtime protection over a disciplined patch process lets you respond in hours instead of waiting on every vendor.
Java4Shell is serious, but it is manageable. Patch the runtime, inventory by exact build, and put protection in front of your most exposed services today. Contrast gives you that protection while the rest of the ecosystem catches up.
What is Java4Shell? A heap out-of-bounds write in OpenJDK's accelerated Base64 decoder, tracked as CVE-2026-114938.
How can I tell if my applications are vulnerable? You need OpenJDK 17.0.6 or later on the 17, 21, 25 or 27 lines, an x86-64 CPU with AVX-512 VBMI, and untrusted Base64 reaching the decoder.
Can SCA or a WAF protect against it? No. SCA has no dependency to flag, and a WAF cannot see what happens inside the JVM.
Is there a workaround? Disabling the intrinsic with -XX:-UseBASE64Intrinsics is the interim option for hosts you cannot patch or protect, with a possible performance cost.
Sr Product Marketing Manager & CISSP
Get the latest content from Contrast directly to your mailbox. By subscribing, you will stay up to date with all the latest and greatest from Contrast.