All articles
ArticlesNovember 18, 20267 min read

Java4Shell (CVE-2026-114938): check exposure and patch

Java4Shell is a critical OpenJDK Base64 decoder bug fixed on November 17. How to check which JVMs and CPUs are exposed, what to patch, and two workarounds.

java4shellcve-2026-114938openjdkjavaremote code executionoracleapplication securityai security research
Java4Shell (CVE-2026-114938): check exposure and patch

Java4Shell (CVE-2026-114938) is a memory-corruption bug in OpenJDK's Base64 decoder, disclosed on November 17, 2026 by the security firm Calif. A remote attacker with no credentials can send malformed Base64 and overwrite heap memory inside the JVM. Calif turned that into remote code execution on default installs of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate.

Oracle and the OpenJDK project shipped fixes the same day, and CISA published an alert urging immediate patching.

I'm a security engineer at erxes, where most of the code is TypeScript. That doesn't put a team like ours out of scope. Plenty of teams that never write a line of Java still run Elasticsearch, Kafka, Jenkins or Keycloak, and every one of those is a JVM. Below is who is exposed, how to check in a few minutes, and what to do if you can't patch today.

What Java4Shell is

Java is memory safe, but the JVM is not written in Java. To decode Base64 faster, HotSpot swaps the Java decoder for hand-written assembly that uses AVX-512 VBMI instructions on CPUs that have them.

According to Calif's Java4Shell write-up, that routine mishandles a stray padding character at the end of the input, computes a negative output length, and writes 62 bytes past the end of the result array. Java rejects the input afterwards, but by then the neighbouring objects on the heap may already be corrupted.

With careful heap grooming, Calif says the overwrite can leak memory "in the style of Heartbleed" or lead to code execution. Datadog's analysis adds a caveat worth knowing: crashing the JVM is the easy outcome, and reliable code execution takes work specific to each application. There is no universal exploit.

That explains the two severity scores. Oracle and the OpenJDK vulnerability advisory rate it 8.1 under CVSS 3.1, with attack complexity marked high. Calif scores it 9.2 under CVSS 4.0. I'd plan around the higher number, and I'll explain why further down.

Who is exposed to Java4Shell

Three conditions have to line up.

The first is the runtime. The OpenJDK advisory marks the Java 17, 21, 25 and 27 lines as affected, and Calif puts the starting point at 17.0.6. Every distribution built from OpenJDK inherits the bug: Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, and Oracle's own builds including GraalVM. Standard Java 8 and 11 are not listed. The one Java 8 exception is Oracle's Enterprise Performance Pack, build 8u511b33-perf.

The second is the CPU. The vulnerable path only runs on x86-64 processors with AVX-512 VBMI: Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, plus AMD EPYC and Ryzen on Zen 4 or newer. ARM64 is not affected. Calif gives this check for Linux:

grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'

If all four flags come back, the host meets the hardware condition. Don't file a clean result as a permanent exemption. Qualys points out that a workload on an unaffected CPU can become affected after a resize or a move to new hardware.

The third is reachability: attacker-controlled data has to hit the decoder. Datadog found that Base64.getDecoder() and Base64.getUrlDecoder() go through the vulnerable path in the build it tested, while the MIME decoder does not. Base64 sits in auth headers, tokens and file uploads, so for any network-facing Java service I'd assume the answer is yes.

Calif's tested list is a good map of where to look first. Before login: Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate. After login: Kafka brokers, Solr, Elasticsearch, Gerrit and Spinnaker. They also got code execution in sample apps on Spring Boot and Apache Struts, and they describe a client-side case where a Java program is compromised just by opening a TLS connection to a malicious server. The lists are not exhaustive.

How to fix Java4Shell

Patch the runtime. These are the fixed Oracle builds from the November 17 patch update:

Release lineFixed build
Java 1717.0.21.1
Java 2121.0.13.1
Java 2525.0.5.1
Java 2727.0.1.1
Java 8 Enterprise Performance Pack8u513-perf

Amazon published Corretto 17.0.21.1.2, 21.0.13.1.2 and 25.0.5.1.2 the same day. Other vendors ship on their own schedules, so check your distribution's advisory instead of assuming.

The JDK installed on the host is often not the one that matters. Elasticsearch ships with its own bundled JDK, and a container image carries whatever runtime its base image had. The CISA alert says the same thing: Java runtimes "may not appear as separate entries in software inventories". So look at the running process, as Datadog recommends:

jcmd <PID> VM.version
jcmd <PID> VM.flags -all

After you update a base image, rebuild and redeploy the application image, then restart the Java processes so they load the new runtime.

If you can't patch today

Calif lists two JVM flags, and Datadog tested both:

  • -XX:-UseBASE64Intrinsics turns off the hardware-accelerated Base64 code and falls back to the plain Java decoder. This is the narrower option.
  • -XX:UseAVX=2 turns off AVX-512 for the whole JVM. Use it only on x86-64, because a JVM on ARM doesn't recognize the flag and won't start.

Neither appears in the Oracle or OpenJDK advisories, so treat them as a stopgap. Both need a JVM restart. For third-party software where you don't control the start command, the JAVA_TOOL_OPTIONS environment variable is the usual way to pass a flag in. Afterwards, confirm with jcmd that the process reports UseBASE64Intrinsics = false.

I wouldn't lean on the network layer. CISA lists input-size limits among its temporary controls, but Qualys notes the malicious input is very short and that a reverse proxy is not a reliable control. Calif says nginx request buffering doesn't stop its Elasticsearch chain. The more useful move is the one Qualys suggests: take identity, build and collaboration consoles off the open internet, or put them behind a VPN, until they're patched.

Why I'd treat it as urgent

As of November 17, Tenable and Qualys had seen no confirmed exploitation, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog. Calif is holding back its product-specific exploits "until everyone has had a chance to upgrade" and says it will publish them later.

"Attack complexity: high" would normally buy some time. The discovery story is why I don't count on it.

Calif says researcher Quang Luong pointed OpenAI's Codex at HotSpot's JIT compiler and intrinsics. It took an hour to find the bug and two more hours to build the first working exploit, for less than $200 in tokens. After the team built its exploitation pipeline, the write-up says most of the later chains were "built almost autonomously with AI".

So the per-product work that earns the "high complexity" label is work AI agents already did once, cheaply. The fix is open source, and anyone can read the diff. Google's threat team has already described agents turning patches into exploits, and the FBI's ARTEX alert covered the defensive side of the same shift. I'd assume the gap between this patch and working exploits in other hands is short.

The write-up ends with this:

With AI, everyone is asking, "What can we build?" But maybe the right question for security is, "What can we delete?"

— Calif, Java4Shell write-up

The workaround is that idea in a single flag. Calif's own question is whether you need a hand-rolled assembly Base64 decoder to process a few hundred bytes, and its answer is "probably not". For most services I think that's right, and I'd keep the flag on internet-facing JVMs for a while even after patching.

FAQ

Is Java 8 or Java 11 affected by Java4Shell?

Standard Java 8 and 11 builds are not listed as affected in the OpenJDK advisory. The exception is Oracle's Java SE 8 Enterprise Performance Pack, where build 8u511b33-perf is affected and 8u513-perf has the fix.

Is Java4Shell being exploited in the wild?

As of November 17, 2026 there was no public confirmation of exploitation, according to Tenable and Qualys. Calif plans to publish product-specific exploits later, so the quiet period has an end.

Does Java4Shell affect ARM servers?

No. The bug is in an x86-64 code path that needs AVX-512 VBMI, so ARM64 JVMs are not affected. Don't pass -XX:UseAVX=2 to a JVM on ARM, because it will fail to start.

Only by name. Log4Shell was a 2021 flaw in the Log4j logging library. Java4Shell is in the JVM itself, so it doesn't depend on which libraries your application uses.


Sources

Cover image: OpenJDK logo, Wikimedia Commons

Related articles