Last month, the details of PHP2Shell leaked before the embargo lifted, and PHP had to scramble its release out early. This week, the same research firm, Calif, had it happen again, this time with Java. Java4Shell (CVE-2026-114938) is a heap overflow in OpenJDK’s hardware-accelerated Base64 decoder, and on November 17, Calif said it was going public early because the vulnerability had leaked. Oracle and OpenJDK pushed fixes that afternoon, and Calif followed with its write-up.
Java normally runs virtual bytecode inside the Java virtual machine, but when a function gets called often enough, the HotSpot JIT compiler turns it into native code. For some common operations it goes a step further, and swaps in hand-tuned machine code which uses special CPU instructions. On x86-64 CPUs with AVX-512 instructions, Base64 decoding is one of those, chewing through 64 bytes at a time with a mask that decides which output bytes actually get written. When the last chunk of input is a short, malformed tail with “=” padding, the calculated output length underflows below zero, the mask ends up with every bit set, and the decoder writes 64 bytes where it should have written at most two. Java then correctly throws an exception for the bad input, but by then, 62 bytes past the end of the output buffer have already been overwritten.
The overwritten bytes are fixed; the attacker controls when and where the write happens, but not what is written. Calif turned that into a working exploit anyhow. The overflow overwrites the length field of a nearby array, which allows for overwriting more of the heap with chosen values, and then into a way to read heap memory back in a response, which may hold keys, tokens, and other secrets. From there, Calif escalated to code execution, grooming the heap remotely by carefully timing the pieces of the HTTP request. Calif is holding back the exploits for specific applications for now, and points out that every target needs its own custom setup.
Not every Java server is vulnerable. The bug needs OpenJDK 17.0.6 or newer, and an x86-64 processor with AVX-512 VBMI, which in practice means Intel Ice Lake or newer server chips, or AMD Zen 4 or newer; ARM servers are safe. The decoder also has to be JIT compiled first, which Upwind found took about 10,000 decodes, so a busy server qualifies and an idle one may not. Unfortunately, Base64 shows up everywhere attacker input arrives. i’IUpwind found that the standard HTTP Basic authentication handling in Spring Security, Tomcat, and Jetty, as well as Auth0’s java-jwt library, feed attacker-supplied data to the vulnerable decoder before checking any credentials. If you can’t update yet, starting Java with “-XX:-UseBASE64Intrinsics” disables the vulnerable code. Unlike Log4Shell, this is a bug in the Java runtime itself, not in a library, so dependency scanners won’t find it, and the fix means replacing the runtime everywhere it lives, including inside every container image.
