Sixty-four A characters and a single =. That is the entire public trigger for CVE-2026-114938 — Java2Shell, also reported as Java4Shell — the memory-corruption vulnerability in OpenJDK's hardware-accelerated Base64 decoder that Calif disclosed on 17 November 2026. CVSS 4.0 scores it 9.2. Researchers have demonstrated pre-authentication remote code execution against default configurations of Keycloak, Apache Kafka, Jenkins, Atlassian Confluence and Jira, JFrog Artifactory, Gerrit, PingFederate and plain Spring Boot applications. CISA has urged immediate patching.
The bug lives in the JVM itself, not in your code — which is exactly why the fastest containment is not a WAF rule or an input filter, but a single JVM flag: -XX:-UseBASE64Intrinsics. This article covers how the bug works, why the flag removes the vulnerable code path entirely, and how to roll it out across a fleet of JVM services — including containers you cannot quickly rebuild — with one environment variable.
java.util.Base64 is pure Java, but HotSpot does not always execute the Java version. The C2 JIT compiler replaces the hot decode loop with an intrinsic: a hand-written assembly stub that uses AVX-512 instructions to chew through 64 bytes at a time. The intrinsic is trusted — it never receives the destination array length and never re-checks the bounds. The Java code allocates exactly the right output buffer and assumes the stub stays inside it.
That assumption breaks on padded input. The stub's padding handler computes the remaining output size with an unguarded decrement:
__ BIND(L_padding);
__ decrementq(output_size, 1); // underflow: not guarded against zero
__ bzhiq(output_mask, output_mask, output_size);
__ evmovdqub(Address(dest, dp), k1, tmp, true, Assembler::AVX_512bit);
bzhiq builds a store mask from that length. When the input ends in a padding character, the counter drops below zero, reads as unsigned, and the mask stays all ones — so VMOVDQU8 stores a full 64 bytes regardless of the actual output size. For the 65-byte trigger, the decoder has allocated a 50-byte array and the store starts at offset 48: 62 bytes land past the end of the buffer. Java then throws IllegalArgumentException — several instructions too late. The exception does not roll back the native write.
Not every JVM on every server is exposed. Three conditions must hold simultaneously:
| Condition | Details |
|---|---|
| CPU | x86-64 with avx512f, avx512bw, avx512vbmi and bmi2 — Intel Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids; AMD Zen 4 and later. ARM64 is architecturally safe, as are consumer Intel parts from gen 12–14 (AVX-512 fused off). |
| Runtime | OpenJDK 17.0.6 or newer on the 17/21/25/27 lines, up to and including 17.0.21, 21.0.13, 25.0.5, 27.0.1. Every vendor build from the same source is affected: Temurin, Corretto, Zulu, Liberica, SAP Machine, Microsoft and Red Hat builds, Oracle Java SE and GraalVM. |
| Intrinsic enabled | The vulnerable stub only runs when UseBASE64Intrinsics is on. Defaults differ by build and line — on one Temurin 17.0.21 we checked it was false, on 21.0.13 true. Two hosts on the same version number can sit on opposite sides of the boundary. |
Check the hardware gate on Linux with:
grep -om1 -E 'avx512vbmi' /proc/cpuinfo
Empty output means this specific bug cannot reproduce on that host — Docker does not emulate missing CPU instructions, so the same image is safe on one machine and vulnerable on another.
The input-path condition is the uncomfortable one: Base64 is everywhere an attacker already has reach. HTTP Basic credentials, JWT segments, SAML artifacts, CSRF tokens, WS-Security headers, MIME bodies, upload handlers. Cisco Talos confirmed the decode path is reachable before authentication in the default configurations of the affected products listed above.
Patching is the real fix (more on versions below). But for services you cannot restart onto fixed builds within the hour, the mitigation is narrow, verified and reversible:
java -XX:-UseBASE64Intrinsics -jar app.jar
The flag falls back to the pure-Java decoder, which bounds-checks like any ordinary Java code. VulnCheck reproduced the overflow on OpenJDK 17, 21 and 25 and confirmed the flag stops it on all three lines. An independent lab run measured the difference directly: identical container, identical CPU, identical trigger — 62 bytes written past the output with the intrinsic on, zero bytes with -XX:-UseBASE64Intrinsics.
Two operational nuances matter:
-XX:+UnlockDiagnosticVMOptions or the JVM refuses to start. If a service dies immediately after you add the flag, that is why — check jcmd VM.flags | grep -i base64 on a running process to confirm what actually took effect.-XX:UseAVX=2 caps the JVM at AVX2 and also kills the vulnerable path, but it is x86-64 only. ARM64 JVMs do not recognise the flag and fail to start — a mitigation that converts a vulnerability into an outage if you apply it blindly across a mixed fleet.The performance cost of losing the intrinsic is modest: Base64 decoding simply runs at Java speed instead of AVX-512 speed. Validate Base64-heavy paths — token issuance, mail processing, broker traffic — but expect the impact to be tolerable for most services.
Editing every start script, systemd unit and Dockerfile is where mitigation programmes go to die. The JVM gives you a universal injection point: the JAVA_TOOL_OPTIONS environment variable is picked up by every JVM that starts, including embedded runtimes inside containers and appliances — Neo4j, Keycloak, Kafka, Jenkins, whatever ships its own JRE.
We applied it to our own Neo4j node first, because it is exactly the kind of long-running JVM service nobody wants to rebuild mid-week:
docker run -d \
--name knowledge-neo4j \
--restart unless-stopped \
-p 7475:7474 -p 7688:7687 \
-v knowledge_neo4j_data:/data \
-v knowledge_neo4j_logs:/logs \
-e NEO4J_AUTH=<redacted> \
-e JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics" \
neo4j:5
In Docker Compose, the same variable slots into any service definition without touching its entrypoint:
services:
keycloak:
image: quay.io/keycloak/keycloak:26
environment:
JAVA_TOOL_OPTIONS: "-XX:-UseBASE64Intrinsics"
Verification is built in: every JVM that picks up the variable prints Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics to stderr before anything else — grep your container logs for it. For a definitive check on a live process:
jcmd <pid> VM.flags | tr ' ' '\n' | grep -i base64
Two caveats. First, JAVA_TOOL_OPTIONS applies to every JVM in that container or host, including CLI tools — harmless for this particular flag, but a habit to remember when the flag is not universally safe (see UseAVX=2 on ARM). Second, environment variables only take effect on process start. A running JVM keeps its compiled code regardless of what you export next; the container must be recreated or the service restarted.
The workaround is a stopgap. Oracle shipped fixed builds on 17 November 2026:
| Line | Oracle fixed build | Amazon Corretto fixed build |
|---|---|---|
| Java 17 | 17.0.21.1 | 17.0.21.1.2 |
| Java 21 | 21.0.13.1 | 21.0.13.1.2 |
| Java 25 | 25.0.5.1 | 25.0.5.1.2 |
| Java 27 | 27.0.1.1 | 27.0.1.1.4 |
Three things to get right:
27.0.1.1.4, not Oracle's 27.0.1.1. Matching Oracle's numbers against a non-Oracle runtime gives the wrong answer; check your vendor's advisory. As of disclosure, several vendors — Temurin among them — had not yet published confirmed fixed builds, which is precisely the gap the workaround covers.java -version sweeps. Inventory by running process, not by package list.Failed exploitation attempts look like unexplained JVM crashes: hs_err_pid*.log files on AVX-512 hosts are worth triaging. Cisco Talos ships Snort rules (Snort 2 SIDs 1:67502–67513, Snort 3 SID 1:301754) that detect malformed Base64 in HTTP request fields. If you mine logs directly, the trigger shape is distinctive — flag Base64 values where:
= characters,One warning for anyone running scans: one-shot scanners under-report. The overflow fires on the first malformed value after C2 compiles the intrinsic, and the exception deoptimises the decoder — the next request can come back clean until tens of thousands of valid decodes re-arm the compiler. A vulnerable service probed twice will look patched. Repeat with volume, or trust the flag status on the process instead.
Java2Shell is a reminder that the JVM's performance engineering — intrinsics, vector instructions, trusted fast paths — is attack surface too. Until your fleet runs fixed builds, one flag closes the hole: -XX:-UseBASE64Intrinsics, delivered everywhere at once via JAVA_TOOL_OPTIONS. Start with internet-facing identity and integration services that decode attacker-supplied Base64 before authentication — SSO, API gateways, brokers, CI — then work through the rest and end by removing the flag after your vendor's fixed build lands.