On November 17, 2026, researcher Calif publicly disclosed CVE-2026-114938 (Java4Shell), a heap-buffer-overflow in OpenJDK HotSpot's AVX-512 VBMI Base64 decoder. The flaw is in StubRoutines::implDecode, where a BZHI instruction derives the output write mask from register %r13. When %r13 underflows to -1, BZHI reads its low 8 bits as 255, producing an all-ones mask that causes a full 64-byte vmovdqu8 store. The write happens before the application sees the IllegalArgumentException.
Calif's analysis identifies pre-auth attack surfaces in Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins, and PingFederate. Blackpoint independently demonstrated JVM crashes and a memory disclosure primitive; Calif reported full RCE via heap metadata corruption. All HotSpot-based JDK distributions shipping affected versions on x86-64 with AVX-512 VBMI are vulnerable. Non-HotSpot runtimes (such as IBM Semeru/OpenJ9) do not use this intrinsic and are not affected.
|
CVE |
CVE-2026-114938 (Java4Shell) |
|
Type |
Heap buffer overflow (write-before-validate) |
|
Trigger |
65 bytes of malformed Base64 (64 'A' + '=') on JDK 21+ |
|
Impact |
62 unexpected byte modifications at output positions 50 through 111 |
|
CVSS |
9.2 (Calif v4.0) / 9.8 (Red Hat) / 8.1 (Oracle v3.1) |
|
Affected |
HotSpot-based OpenJDK 17.0.6+, 21.x, 25.x, 27.x; Oracle 8u511b33-perf; unpatched HotSpot-based distributions containing the affected intrinsic on x86-64 with AVX-512 VBMI |
|
Fixed |
OpenJDK 17.0.21.1+4, 21.0.13.1+4, 25.0.5.1+4, 27.0.1.1+4 (vendor builds vary) |
|
CPU Req |
x86-64 with AVX-512 VBMI (Intel Ice Lake+ Xeon, AMD Zen 4+) |
|
Workarounds |
-XX:-UseBASE64Intrinsics or -XX:UseAVX=2 |
|
Component |
Detail |
|
Operating System |
Windows Server 2022 Datacenter |
|
CPU |
Intel Xeon 6973P-C (Granite Rapids) with AVX-512 VBMI |
|
JDK Under Test |
Eclipse Temurin 21.0.2+13-LTS |
|
Patched JDK |
Microsoft Build of OpenJDK 21.0.13.1+2 |
|
Telemetry |
Sysmon v15.22, WER (full dumps), Process Audit Policy |
In our lab instance, the Intel Granite Rapids Xeon processor provided native AVX-512 VBMI support. The JVM flags UseAVX=3 and UseBASE64Intrinsics=true are both defaults on this processor, so the vulnerable intrinsic was active out of the box.
We ran a PoC based on the Calif disclosure (Base64Trigger class) against JDK 21.0.2+13-LTS with diagnostic flags enabled:
runtime=21.0.2+13-LTS
rejected=true changed=62 first=50 last=111
REPRODUCED
The input was rejected with IllegalArgumentException, but the decoder wrote 62 unexpected bytes at offsets 50 through 111 before rejecting. Control tests confirmed this is specific to the AVX-512 path: disabling the intrinsic (-XX:-UseBASE64Intrinsics) or falling back to AVX2 (-XX:UseAVX=2) eliminated the unexpected writes entirely.
We ran BoundaryVerifier, a public poc on the same host, comparing the vulnerable and patched runtimes:
|
Run |
Runtime |
AVX Mode |
Anomalous Bytes |
Result |
|
A |
OpenJDK 21.0.2+13 |
AVX-512 |
62 (offsets 50-111) |
VULNERABLE |
|
B |
OpenJDK 21.0.2+13 |
UseAVX=2 |
0 |
Clean |
|
C |
MS OpenJDK 21.0.13.1+2 |
AVX-512 |
0 |
Clean (patched) |
The vulnerable configuration wrote 112 bytes in total, with 62 occurring beyond the harness's calculated logical decode boundary. The 62 unexpected byte modification signature appeared only with the vulnerable JVM on the AVX-512 path. The patched runtime eliminated it without disabling AVX-512. All writes in this harness remained inside the allocated 4,096-byte array; these tests do not independently establish cross-object corruption or code execution.
In our test configuration, the compilation logs show the Base64 decoder progressed from C1 to C2 during warmup. Our -XX:+PrintCompilation output captures the activation:
; PrintCompilation diagnostic output from Windows lab
60 88 3 java.util.Base64$Decoder::decodeBlock (186 bytes) ; C1 tier 3
61 92 4 java.util.Base64$Decoder::decodeBlock (186 bytes) ; C2 tier 4
64 88 3 ...decodeBlock (186 bytes) made not entrant ; C1 replaced
@ 63 java.util.Base64$Decoder::decodeBlock (186 bytes) (intrinsic) ; stub confirmed
Our JIT compilation logs show that C2 selected an optimized intrinsic for the Base64 decoder, and the native disassembly identifies the vulnerable StubRoutines::implDecode routine (1,319 bytes of hand-written AVX-512 assembly). The C1 disassembly contains explicit array bounds checks and exception handling paths. The C2 implementation applies different compilation and deoptimization mechanisms and invokes the native decoding stub. Our tests associate the unexpected writes with the accelerated decoding path, although we did not independently trace the precise instruction executed for each write. The vulnerable behavior originates in the native decoder's output-mask calculation rather than a general absence of bounds checking in C2-compiled Java code.
Following reproduction, the compilation logs showed that the affected compiled methods were marked made not entrant. The subsequent execution path and recompilation behavior were not independently verified.
We extracted StubRoutines::implDecode (address range 0x1ca9792d8a0-0x1ca9792ddc7) using -XX:+UnlockDiagnosticVMOptions -XX:+PrintStubCode. The stub processes Base64 input in 64-byte blocks using AVX-512 VBMI shuffle-based decoding.
Each 64-byte block produces 48 bytes of output with a constant mask:
; Address 0x1ca9792dadc: main loop write
vmovdqu8 %zmm2, (%r9,%r12,1){%k2} ; 48-byte write, constant mask
sub $0x40, %r14d ; remaining -= 64
add $0x30, %r9 ; output_ptr += 48
The mask %k2 holds constant 0x0000ffffffffffff (48 ones). Under the normal full-block path with valid destination bounds, this write is bounded correctly. The vulnerability is in the final partial block handler.
When fewer than 64 input bytes remain, the stub calculates dynamic masks. The following are selected from separate execution paths, not one continuous sequence:
; --- Path A: input mask and output length (0x1ca9792daff) ---
mov $0xffffffffffffffff, %rax ; rax = all-ones (input mask seed)
bzhi %r14, %rax, %rax ; INPUT mask from remaining count
mov %r14d, %r13d ; r13 = remaining input count
shr $0x2, %r13d ; r13 = r14 / 4
lea 0x0(%r13,%r13,2), %r13 ; r13 = r13 * 3 (output length)
; --- Branch: padding check (0x1ca9792db17) ---
cmpb $0x3d, -0x1(%rcx,%r14,1) ; last byte == '='?
je <padding_handler> ; yes: branch to padding handler
; --- Path B: output mask (0x1ca9792db14, reached after padding handler) ---
mov $0xffffffffffffffff, %r15 ; r15 = all-ones (output mask seed)
bzhi %r13, %r15, %r15 ; OUTPUT mask from output length
The padding handler decrements the output length register %r13 for each '=' character:
; 0x1ca9792dbc3: padding handler
dec %r13 ; output_length--
shr %rax ; input_mask >>= 1
cmpb $0x3d, -0x2(%rcx,%r14,1) ; second '='?
jne <apply_mask> ; no: done
dec %r13 ; output_length-- again
shr %rax ; input_mask >>= 1 again
With 65 bytes of input (64 'A' + '='), %r14 is 1 after the main loop. Output length %r13 = (1 / 4) × 3 = 0 (integer truncation). The padding handler decrements %r13 to -1 (0xFFFFFFFFFFFFFFFF as a 64-bit value). BZHI reads only the low 8 bits of the index operand per the Intel specification, so it sees 0xFF (255), which exceeds the 64-bit register width and leaves all 64 mask bits set in %r15.
; 0x1ca9792db23: input read (mask from r14 is correct)
kmovq %rax, %k1
vmovdqu8 (%rcx,%rdx,1), %zmm0{%k1} ; masked read
; ... AVX-512 VBMI shuffle decode ...
; 0x1ca9792db14: output mask from underflowed r13
mov $0xffffffffffffffff, %r15 ; r15 = all-ones seed
bzhi %r13, %r15, %r15 ; r13 = -1, low 8 bits = 0xFF
; BZHI keeps all 64 bits set
; 0x1ca9792db86: output write (mask is CORRUPTED)
kmovq %r15, %k1
vmovdqu8 %zmm10, (%r9,%r12,1){%k1} ; OVERSIZED WRITE: all 64 bytes
With %r15 all-ones, vmovdqu8 at 0x1ca9792db8b writes a full 64 bytes where it should write far fewer. The PoC detected byte modifications at positions 50-111. In production, where the output buffer is correctly sized, this write can cross the allocation boundary, depending on buffer sizing and heap layout.
Our analysis of the 2.6 MB stub disassembly (extracted via -XX:+PrintStubCode on OpenJDK 21.0.2+13) counted 426 `kmovq`, 181 `bzhi`, and 67 `vmovdqu8` instruction occurrences across HotSpot's native routines (pattern-matched from disassembly output). These appear in multiple components beyond Base64 decoding. The Java4Shell vulnerability is specific to the incorrect output-mask generation in the Base64 decoder; the counts provide context about how extensively HotSpot uses masked vector operations.
The PoC uses a 4,096-byte destination buffer, so the 62 unexpected writes remained within bounds. In production, where the buffer is sized to the expected decode length, the oversized write can cross the allocation boundary, depending on buffer sizing and heap layout. HotSpot's TLAB bump-pointer allocation places objects contiguously, so adjacent metadata can be at a predictable offset.
Blackpoint demonstrated crashing a Spring Boot application with ~28,300 malformed requests over ~20 seconds of active sending (~24.5 seconds of total JVM uptime) in one tested configuration and demonstrated a memory disclosure primitive. Calif reported full RCE via heap metadata corruption, though Blackpoint did not reproduce the individual RCE chains. Reliable exploitation requires controlling TLAB layout, and the deoptimization behavior we observed may narrow the window, but pre-auth surfaces with high request volume remain at risk.
Our lab was instrumented with Sysmon v15.22, WER (full dump configuration), and Process Audit Policy. These telemetry sources support exposure discovery and inventory (identifying which hosts run vulnerable JDK versions) rather than reliable exploit detection. Sysmon cannot observe JVM internals (JIT compilation, intrinsic substitution, heap state), so the signals below are indirect indicators.
EDR queries can target vulnerable JDK version execution, crash artifact creation (hs_err_pid*.log, .dmp), and JVM flags associated with the affected intrinsic.
Howler Cell Assessment: Windows Server 2022 tests reproduce unexpected Base64 decoder writes on OpenJDK 21.0.2+13. Limiting AVX to level 2 or using Microsoft OpenJDK 21.0.13.1+2 eliminates the signature. Native disassembly identifies the vulnerable output-mask calculation in StubRoutines::implDecode, where %r13 underflows through the padding handler and BZHI produces an all-ones mask in %r15. Our bounded test does not establish cross-object heap corruption or code execution; published research describes wider impact including crashes, memory disclosure, and reported RCE. Prioritize vendor fixes and review exposed Java services processing untrusted Base64 input.