3D editorial illustration of a CPU silicon die with glowing crimson vector lanes breaching a glass memory boundary wall, intercepted by an emerald security shield protecting enterprise application nodes.Illustration of AVX-512 Base64 memory boundary overflow and JVM security shielding for Spring Boot workloads.

On November 17, 2026, sixty-five bytes of malformed Base64 broke one of Java’s oldest promises: that standard library parsing cannot corrupt JVM memory.

Disclosed by security research firm Calif alongside Oracle’s emergency November security patch, Java4Shell (also referred to as Java2Shell, tracked as CVE-2026-114938) is a heap out-of-bounds write inside HotSpot’s C2 JIT x86-64 AVX-512 VBMI Base64 decoder intrinsic. Josh Long opened This Week in Spring with an all-caps warning—“UPDATE YOUR JVMs!”—and for good reason. Calif demonstrated pre-authentication remote code execution (RCE) against default configurations of Keycloak, Atlassian Jira, Confluence, JFrog Artifactory, Jenkins, and PingFederate, plus sample Spring Boot and Apache Struts applications.

Not every JVM is vulnerable, though, and applying the wrong stopgap flag in a mixed x86-64/ARM64 Kubernetes cluster will crash your pods on startup. In this guide, we will break down how the BZHI/VMOVDQU8 overflow actually works, map out the exact affected and fixed OpenJDK versions, examine why even non-public backend services are exposed through outbound TLS, and walk through concrete Spring Boot, Docker, and Kubernetes remediation steps.

1. How a 65-Byte Base64 String Breaks JVM Memory Safety

Standard Java code is bounds-checked by the JVM. The vulnerability does not live in the pure-Java fallback of java.util.Base64.Decoder—it lives in a hand-written x86-64 AVX-512 VBMI assembly stub introduced in OpenJDK 17.0.6 so HotSpot’s C2 JIT compiler can decode wide Base64 blocks in SIMD registers.

When the C2 compiler optimizes a hot call site to Base64.getDecoder().decode(...), the intrinsic processes full SIMD blocks and then handles the trailing partial block using a masked vector store (VMOVDQU8). Here is the exact sequence where things go off the rails:

  1. For the trailing partial block, the assembly stub computes remaining output bytes as (len / 4) * 3.
  2. It subtracts 1 for each trailing padding character (=).
  3. It passes that byte count to the x86 BZHI (Zero High Bits) instruction to build the 64-bit write mask for VMOVDQU8.
  4. The underflow: When given a malformed tail such as =, X=, or ===, (len / 4) * 3 evaluates to 0. Subtracting 1 underflows to -1. Because BZHI only inspects the lowest 8 bits of its index operand, -1 is read as 255. Since 255 >= 64, BZHI zeroes no bits, producing an all-ones 64-bit mask.
  5. The 62-byte heap overwrite: Sending 64 'A' characters followed by '=' (or 128 'A' characters + '=' on older JDK 17 builds) causes Java to allocate a 50-byte destination byte[], write 48 valid decoded bytes, and then execute a full 64-byte VMOVDQU8 store starting at offset 48. That overwrites 62 bytes past the end of the array across adjacent heap objects before the decoder throws IllegalArgumentException.

From there, exploitation follows a classic memory-corruption chain that JFrog and Calif have documented in detail:

  • G1 Heap Grooming: An attacker arranges adjacent allocations on the G1 heap so a victim “writer” array sits immediately after the Base64 output buffer.
  • “JavaBleed” (Arbitrary Heap Disclosure): The 62-byte overwrite corrupts the victim array’s length field, allowing it to enlarge a second “reader” array and leak arbitrary JVM heap memory (tokens, session secrets, database credentials).
  • Code Cache RCE: Using the arbitrary read/write primitive, the exploit locates executable JIT-compiled machine code in the JVM Code Cache and overwrites it to execute arbitrary native shellcode.

That complexity explains the CVSS split between the discoverers and Oracle: Calif scores CVE-2026-114938 at CVSS v4.0 9.2 (Critical) because pre-auth endpoints in major enterprise platforms are trivially reachable, while Oracle scores it at CVSS v3.1 8.1 (High) due to the application-specific G1 heap grooming required for reliable RCE. Either way, unauthenticated remote heap corruption in java.util.Base64 is a drop-everything patch event.

2. Who Is Actually Vulnerable? (The Three Preconditions)

Before you page every team in your organization, verify all three mandatory preconditions. Every single one must hold for a JVM process to be exploitable:

PreconditionVulnerable ConfigurationNot Exploitable
1. JVM RuntimeOpenJDK 17.0.6+, 21, 25, 27 and downstream builds (Oracle Java SE, Eclipse Temurin, Amazon Corretto, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle GraalVM), plus Oracle Java 8 Enterprise Performance Pack (8u511b33-perf).Standard Java 8, Java 11, OpenJDK 17.0.0–17.0.5, and Eclipse OpenJ9.
2. CPU Architecturex86-64 CPUs with AVX-512 VBMI (avx512f, avx512bw, avx512vbmi, bmi2)—Intel Xeon Ice Lake, Sapphire/Emerald/Granite Rapids, and AMD Zen 4+ (e.g., AWS c6i, m6i, c7i, c7a, m7a).ARM64 (AWS Graviton, Apple Silicon), 32-bit x86, and older AVX2-only x86-64 hosts.
3. Reachable Base64 + Warm C2Untrusted external input reaches java.util.Base64.Decoder after C2 JIT compilation warms up (typically minutes on active services).Purely offline/air-gapped JVMs with zero external Base64 decoding.

Do not treat an ARM64 or AVX2 host check as a permanent pass. As JFrog’s security team highlighted, container schedulers routinely reschedule pods onto newer x86-64 cloud instance families during node upgrades or spot replacements. An unpatched container image running safely on an older Xeon node today becomes immediately exploitable the moment Kubernetes moves it onto a c7i or c7a node tomorrow.

3. Why Internal Services Are Not Safe: The Outbound TLS Vector

In a Spring Boot microservices estate, the obvious attack surfaces are inbound endpoints: HTTP Basic authentication headers, JWT parsing in Spring Security resource servers, OAuth2 token validation, and Base64-encoded file uploads.

However, security researcher samczsun demonstrated a client-side exploitation vector that catches many internal-only backends off guard: any Java application opening an outbound TLS connection to an attacker-controlled server can be compromised, even if it exposes zero inbound HTTP ports. Certificate parsing and PEM/Base64 decoding during TLS handshakes or webhook/OAuth discovery callbacks feed untrusted remote bytes straight into the JVM’s Base64 decoder.

If your Spring Boot service fetches webhooks, scrapes third-party APIs, calls external OIDC discovery URLs, or connects to external MCP servers over HTTPS, it is in scope for immediate patching.

4. Affected vs. Fixed OpenJDK Versions Matrix

The upstream OpenJDK patch is only four lines long—routing trailing fragments shorter than a full 4-character Base64 block back to the safe pure-Java path—and is already live across every major distribution.

Java BranchAffected VersionsFixed Minimum VersionUpgrade Notes
Java 17 (LTS)17.0.6 – 17.0.21.0.317.0.21.1E.g., Amazon Corretto 17.0.21.1.2, Temurin 17.0.21.1+....
Java 21 (LTS)Up to 21.0.13.0.321.0.13.1All prior Java 21 builds on AVX-512 hosts are vulnerable.
Java 25 (LTS)Up to 25.0.5.0.325.0.5.1Primary baseline for Spring Boot 4 applications—patch immediately.
Java 27Up to 27.0.1.0.327.0.1.1Latest feature release line.
Java 8 (Perf Pack)8u511b33-perf8u513-perfStandard OpenJDK 8 & 11 are unaffected.
18–20, 22–24, 26All buildsNone (EOL)No patch will be issued; migrate to 17, 21, 25, or 27.

5. Auditing Your Hosts and Applying Safe Stopgap Mitigations

First, check whether your Linux nodes expose AVX-512 VBMI and verify every bundled JVM (including embedded JREs inside Jenkins, Keycloak, Kafka, and Docker images):

# 1. Check host CPU for AVX-512 VBMI support
grep -m1 -oE 'avx512(f|bw|vbmi)|bmi2' /proc/cpuinfo | sort -u

# 2. Verify exact JVM runtime version inside a running container or host
java -XshowSettings:properties -version 2>&1 | grep -E 'java\.runtime\.version|os\.arch'

If you cannot roll patched container base images out across your entire fleet within the hour, disable the vulnerable C2 intrinsic via JAVA_TOOL_OPTIONS or your container entrypoint.

The Safe Flag vs. The ARM64 Crash Trap

Two JVM mitigation flags have circulated online since November 17, and choosing the wrong one can cause an outage in multi-arch clusters:

  • Use this everywhere: -XX:-UseBASE64Intrinsics — Disables only the Base64 C2 intrinsic while leaving every other AVX-512 optimization intact, and starts cleanly on both x86-64 and ARM64.
  • Avoid in multi-arch configs: -XX:UseAVX=2 — Works on x86-64, but crashes JVM startup on ARM64 (Apple Silicon, AWS Graviton) with Unrecognized VM option 'UseAVX=2'.

Here is how to roll out the safe stopgap immediately in a Kubernetes Deployment while your CI pipeline rebuilds base images against 25.0.5.1 or 21.0.13.1:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: order-service
spec:
  template:
    spec:
      containers:
        - name: app
          image: ghcr.io/acme/order-service:4.2.0
          env:
            # Safe across x86-64 and ARM64 until patched JDK base image rolls out
            - name: JAVA_TOOL_OPTIONS
              value: "-XX:-UseBASE64Intrinsics"

And if you are building Spring Boot container images with Dockerfile or Cloud Native Buildpacks (bootBuildImage), pin your base runtime explicitly to a patched .1 tag rather than a cached floating :25-jre tag:

# Always pull a verified patched build (25.0.5.1+, 21.0.13.1+, 17.0.21.1+, or 27.0.1.1+)
FROM eclipse-temurin:25.0.5.1-jre-noble

WORKDIR /app
COPY build/libs/app.jar app.jar

ENTRYPOINT ["java", "-jar", "app.jar"]

For Spring Boot teams using Gradle bootBuildImage, force a fresh builder/runtime pull (--pullPolicy=ALWAYS or pullPolicy = PullPolicy.ALWAYS in build.gradle.kts) and verify the resulting image’s java -version before promoting it to production.

6. Post-Patch Verification Checklist

Before closing your incident ticket, run through four quick checks:

  1. Audit third-party Java appliances: Your own Spring Boot services are only half the estate. Keycloak, Jenkins, Artifactory, Jira, Confluence, Elasticsearch, and Kafka brokers often ship bundled JREs—patch those runtimes too.
  2. Confirm JAVA_TOOL_OPTIONS propagation: If you applied -XX:-UseBASE64Intrinsics as a stopgap, inspect startup logs for Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics to ensure entrypoint scripts did not override it.
  3. Remove the stopgap after upgrading: Once every pod is running 17.0.21.1+, 21.0.13.1+, 25.0.5.1+, or 27.0.1.1+, remove -XX:-UseBASE64Intrinsics so your high-throughput Base64 encoding/decoding workloads regain SIMD performance.
  4. Rotate sensitive secrets on internet-facing AVX-512 hosts: If an unpatched Keycloak, Jenkins, or public Spring Boot service ran on an AVX-512 node after disclosure, treat in-memory signing keys and API tokens as potentially exposed to “JavaBleed” heap reads and plan a clean credential rotation.

Conclusion

Java4Shell is a sobering reminder that even memory-safe runtimes rely on hand-tuned native assembly under the hood. The good news is that the fix is clean, tiny, and already available across every supported OpenJDK distribution. Patch your JDKs to the .1 security builds (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1), drop -XX:-UseBASE64Intrinsics onto anything that cannot restart with a new image today, and do not forget your bundled third-party Java appliances or outbound-TLS workers.


Discover more from GhostProgrammer - Jeff Miller

Subscribe to get the latest posts sent to your email.

By Jeffery Miller

I am known for being able to quickly decipher difficult problems to assist development teams in producing a solution. I have been called upon to be the Team Lead for multiple large-scale projects. I have a keen interest in learning new technologies, always ready for a new challenge.