Java4Shell is the name the research firm Calif gave to CVE-2026-114938, a memory corruption bug in OpenJDK’s Base64 decoder. It became public on 17 November 2026. An attacker with no password sends a crafted value to a Java application, and the decoder overwrites memory beside its output. Calif turned that into remote code execution on Jenkins, Keycloak, Jira and several other products in their default settings. The fix is a Java update and a restart. Finding every copy of Java that needs it is the slow part.
Java4Shell affects OpenJDK 17, 21, 25 and 27 running on x86-64 processors with AVX-512 VBMI. Update to 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1, or your vendor’s matching build, and restart every Java service. If you cannot patch today, the startup flag
-XX:-UseBASE64Intrinsicsswitches off the vulnerable code until you can.
We read the OpenJDK and Oracle advisories on 26 November 2026. We also read Cloudflare’s write-up of the research and the Jenkins project’s guidance. Version numbers below come from those pages and from Adoptium’s own release data.
What Java4Shell is
A bug in the fast Base64 decoder
Base64 turns binary data into plain text. Java applications decode it constantly, in login headers, tokens, uploaded files and messages between services. To make that quick, the HotSpot virtual machine swaps in hand-written machine code on processors that support it. On x86-64 chips with AVX-512, that routine works through 64 bytes at a time.
The bug sits in the part of the routine that handles the last few characters. Cloudflare’s summary of the research explains the trigger. Padding characters where valid Base64 never puts them make the routine calculate a negative length, and that length turns into a full 64-byte write. Take 64 characters followed by one equals sign. Java allocates 50 bytes for the output and then writes 62 bytes past its end. On JDK 17 the trigger needs 128 characters before the equals sign. The fast path starts at a higher threshold there.
Why input checks in your code cannot stop it
Java rejects the value in the end. By then the memory beside the output has already been overwritten. Validation in your own code runs too late, since the damage happens inside the decoder before your code sees anything.
Calif used the overwrite first to read heap memory and then to run code of its choosing. Each application needs its own Java4Shell exploit chain. Even so, Calif reported a first working local exploit after about three hours with help from AI agents. Other attackers will not need long either.
The list of products Calif broke is what makes Java4Shell serious. Without logging in, it ran code on Keycloak, Atlassian Jira and Confluence, JFrog Artifactory, Jenkins and PingFederate. Apache Kafka, Apache Solr, Elasticsearch, Gerrit and Spinnaker fell to attackers who already had an account. A Java program that connects to a malicious TLS server is at risk too. That holds even when it offers no service of its own.
Which systems Java4Shell affects
A system is exposed only when three things are true at once. It runs an affected Java build on a processor with AVX-512 VBMI. Some part of it also decodes Base64 that an outsider can supply. Almost any server that accepts logins or tokens meets the third condition, so the first two decide it.
Java versions and the builds that fix them
The OpenJDK advisory of 17 November 2026 scores the bug 8.1 on CVSS 3.1. It lists the 17, 21, 25 and 27 release lines, and the 8 and 11 lines do not contain the vulnerable code. Oracle’s November 2026 Critical Security Patch Update also lists its Java SE 8 performance build, 8u511b33-perf. Oracle GraalVM is on that list too, so check both if you run them.
Every distribution built from OpenJDK is in scope. Cloudflare’s list names Amazon Corretto, Eclipse Temurin, the Microsoft Build of OpenJDK and Azul Zulu. BellSoft Liberica, SAP SapMachine, Red Hat’s OpenJDK and Oracle’s own builds are on it as well. The Temurin column below comes from Adoptium’s release data, which shows these builds published on 18 November.
| Java line | Exposed builds | Fixed release | Eclipse Temurin build |
|---|---|---|---|
| 17 | 17.0.6 and later, before 17.0.21.1 | 17.0.21.1 | 17.0.21.1+2 |
| 21 | All builds before 21.0.13.1 | 21.0.13.1 | 21.0.13.1+2 |
| 25 | All builds before 25.0.5.1 | 25.0.5.1 | 25.0.5.1+2 |
| 27 | All builds before 27.0.1.1 | 27.0.1.1 | 27.0.1.1+4 |
| 8 and 11 | Not affected in OpenJDK | No change needed | No change needed |
Other vendors number their fixed builds in their own way. Compare against your vendor’s advisory before you mark a host as done.
Processors with AVX-512 VBMI
Java4Shell needs the fast decoder, which only runs on x86-64 processors with the AVX-512 VBMI instructions. Cloudflare names Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids. AMD EPYC and Ryzen from Zen 4 onwards are on the list too. ARM64 machines are not affected, and the Jenkins project also lists s390x and ppc64le as safe.
Cloud servers make Java4Shell exposure easy to misjudge, because the instance name rarely tells you the processor generation. Check the flag on each machine itself. Until you have, treat any x86-64 host as exposed.
How to check a server for Java4Shell
Each server takes a few minutes. Work through the machines in this order and write the result down as you go.
- List every running Java process with
ps -eo pid,args | grep [j]ava. Then runreadlink -f /proc/<pid>/exefor each one to see which runtime it uses. - Run each of those runtimes with
-versionto get the exact build. That includes any copy a product installed in its own folder. - Look inside container images with
docker run --rm <image> java -version. It prints the runtime an image ships without starting the application. - Check the processor with
grep -o -w -m1 'avx512vbmi' /proc/cpuinfo. It prints the flag on an exposed machine and nothing on a safe one. - Compare each build with the table above or your vendor’s advisory. Note which hosts need a patch, a flag or nothing.
The system Java package is only the start. Many products ship their own runtime inside the install folder, and every container image carries a fixed JDK. Updating the operating system’s package leaves those copies alone. It also does nothing for a JVM that is already running.
Patching Java4Shell on servers and containers
Package installs and bundled runtimes
Start with servers that use the operating system’s Java package. Install the vendor’s fixed build and restart every service that runs on it. A Java process keeps the old code in memory until it restarts. A patched package under a process that never restarted leaves the server just as exposed as before.
Products that bundle their own runtime need the vendor’s updated release. Some also offer a supported way to point them at a patched JDK. Read each vendor’s Java4Shell advisory before you swap a runtime by hand. Some products only support the runtime they ship, and an unsupported swap can break an upgrade later.
Jenkins, Keycloak and other containers
Container images are frozen when they are built. A Java4Shell fix there means a new image. Rebuild your own images on a patched base image, or pull a new release of a vendor’s image, then redeploy. The Jenkins project’s post shows its lts-jdk25 image reporting Temurin 25.0.5+8. That build is older than the fixed 25.0.5.1, so check the tag you run.
For Jenkins, upgrade Java and restart the controller. The System Information page under Manage Jenkins shows the Java version the controller runs. Keycloak reads extra JVM options from the JAVA_OPTS_APPEND environment variable, as its production configuration guide
describes. That is where the temporary flag below goes until a patched image is in place.
Scheduled jobs and build agents run Java too, and they are easy to forget. Add them to the inventory alongside the services that face the internet.
The Java4Shell workaround if you cannot patch today
A JVM startup flag removes the vulnerable code. The flag -XX:-UseBASE64Intrinsics turns off the fast Base64 routine, so Java falls back to the standard decoder. The Jenkins project uses it on its own. Cloudflare’s write-up puts -XX:+UnlockDiagnosticVMOptions in front of it. Calif also documents -XX:UseAVX=2, which turns off AVX-512 altogether. Only use that one on x86-64 hosts, because Java on ARM does not recognise it and fails to start.
The Jenkins guidance shows where the flag goes for a systemd service and for Docker. For Keycloak, the same flag goes into JAVA_OPTS_APPEND.
1# systemd override for a service such as Jenkins
2Environment="JAVA_OPTS=-XX:-UseBASE64Intrinsics -Djava.awt.headless=true"
3
4# Docker
5docker run --env JAVA_OPTS="-XX:-UseBASE64Intrinsics" jenkins/jenkins:lts-jdk25
6
7# Keycloak container environment
8JAVA_OPTS_APPEND="-XX:-UseBASE64Intrinsics"
Each change needs a restart. Afterwards, confirm the flag appears in the running process’s command line. Cloudflare warns the flags may slow workloads that decode large amounts of Base64. Treat them as a way to buy time and remove them once the fixed build is in.
What a web application firewall can stop
Cloudflare added six managed WAF rules for Java4Shell on 18 November. They look for malformed Base64 in headers, query strings, request bodies, path segments, JWT parts and WebAuthn values. The rules come with the Pro, Business and Enterprise plans. They start in Log mode, because some legitimate token formats look similar. Review their matches in Security Events, then switch them to Block once you are sure they only catch attacks. When Cloudflare published the post, a rule for the Free plan was still in progress.
A WAF only sees the Java4Shell attempts that arrive as HTTP requests through it. Base64 wrapped inside another encoding gets past it. So do other protocols such as Kafka’s, outbound TLS connections from your own Java programs and calls between internal services. For the traffic it does see, a firewall rule cuts the risk while the patching goes on.
Checking the work after a Java4Shell fix
Run the same checks again once the change is in. Every Java process should report a fixed build or show the workaround flag in its command line. Every image in your registry should report a fixed runtime. Record which hosts lacked AVX-512 VBMI, because moving an unpatched runtime to newer hardware would expose it later.
Some of your servers may have run an exposed build on an exposed processor while facing the internet. Read their logs from 17 November onwards. Look for malformed Base64 in headers and tokens. A long run of characters followed by a single equals sign is the pattern to search for. Unexplained crashes of Java processes in that window deserve a closer look too.
We look for this kind of problem in our application security analysis. It includes a dependency and supply chain audit of the runtimes and libraries your applications ship with. Each finding comes with a risk rating and proof, and the full tier adds the fixes and a follow-up review 30 days later. Finding every runtime that Java4Shell can reach is the kind of job we take on. Send us a list of your servers and products through the quote request form . Our application security analysis page describes the work in more detail.