Skip to content

Summary/Title Text

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.

Key Takeaways

  • CVE-2026-114938 (Java4Shell) is a heap-buffer-overflow in OpenJDK's AVX-512 VBMI Base64 decoder. Affected: JDK 17.0.6+ through 27.x on x86-64 with AVX-512 VBMI (Intel Ice Lake+ Xeon, AMD Zen 4+). CVSS: 8.1 (Oracle) to 9.8 (Red Hat).
  • Howler Cell reproduced the vulnerability on Windows Server 2022 (JDK 21.0.2+13-LTS, Azure Intel Xeon Granite Rapids). A 65-byte malformed Base64 input caused 62 unexpected byte modifications in the output buffer. We extracted the vulnerable assembly from the JVM runtime stubs and traced the root cause to an output length underflow leading to an incorrect output mask through BZHI.
  • Patch immediately: Oracle OpenJDK 21.0.13.1+4, 17.0.21.1+4; Eclipse Temurin 21.0.13.1+2 (per Adoptium advisory); Microsoft OpenJDK 21.0.13.1+2 (tested clean in our lab). Check your vendor's advisory for exact build numbers. Apply -XX:-UseBASE64Intrinsics as a workaround if patching is delayed.

Overview

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

Windows Lab Reproduction

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.

Reproduction Output

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.

Validation Against a Patched Runtime

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.

JIT Compilation Path

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.

Root Cause: Assembly Analysis

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.

Main Loop (Safe)

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.

Final Block and Padding Underflow

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.

The Oversized Write

; 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.

Mask Instruction Surface

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.

Heap Layout and Exploitation

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.

Windows Detection Opportunities

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.

  • Sysmon Event ID 1 (Process Create): Captures java.exe execution with full command line and publisher metadata. Supports discovery of Java processes for follow-up runtime version verification.
  • JVM Crash Files (hs_err_pid*.log): HotSpot generates diagnostic logs when it encounters certain fatal errors. A crash involving StubRoutines::implDecode may warrant further investigation, but the presence of this routine alone does not establish Java4Shell exploitation. Our bounded reproduction did not crash the JVM, and no crash artifacts were generated during testing.
  • Windows Error Reporting: Requires LocalDumps registry configuration (HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps) to capture process crash dumps. Not enabled by default. Fires independently of HotSpot's handler.
  • Security Event ID 4688: Independent process creation audit, complementing Sysmon where it is not deployed.

EDR queries can target vulnerable JDK version execution, crash artifact creation (hs_err_pid*.log, .dmp), and JVM flags associated with the affected intrinsic.

Mitigation

  • Patch immediately. Oracle OpenJDK: 21.0.13.1+4, 17.0.21.1+4, 25.0.5.1+4, 27.0.1.1+4. Eclipse Temurin: 21.0.13.1+2 (per Adoptium advisory). Microsoft OpenJDK: 21.0.13.1+2 (tested clean in our lab). Vendor build suffixes differ; check your vendor's advisory for the correct version.
  • Workaround flags if patching is delayed: -XX:-UseBASE64Intrinsics or -XX:UseAVX=2.
  • Inventory AVX-512 VBMI-capable servers. Intel Ice Lake+ Xeon and AMD Zen 4+ are affected. ARM64 and older x86 CPUs are not.
  • Restart JVMs after patching. The fix takes effect only after the JVM process restarts; a hot-deployed library update is not sufficient.
  • Check container base images. Containers built on affected JDK images must be rebuilt with the patched version.
  • Audit Base64 decode surfaces in pre-auth endpoints and monitor for JVM crash artifacts.

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.

References

{{ include_custom_fonts({"PX Grotesk":["Bold","Bold Italic","Light","Light Italic","Regular","Regular Italic"]}) }}
Be Ready

Stay informed with Howler Cell

Receive the latest Howler Cell news and research directly to your inbox. 

Optional featured resource text

Howler Cell has been tracking and investigating the new variant of MedusaLocker. MedusaLocker is a well-known ransomware family active since late 2019

Ready to close your security gaps?

To stay ahead of today’s relentless threatscape, you’ve got to close the gap between security strategy and execution. Cyderes helps you act fast, stay focused, and move your business forward.