Java4Shell is the name its discoverers gave to CVE-2026-114938, a memory corruption bug in the code HotSpot uses to decode Base64 quickly on modern x86-64 processors. The OpenJDK vulnerability advisory of 17 November 2026 lists it as a hotspot/compiler issue with a CVSS 3.1 score of 8.1 and marks the Java 17, 21, 25 and 27 update lines as affected. The researchers at Calif who reported it say a remote attacker with no credentials can use malformed Base64 to overwrite heap memory, read memory back and, in some applications, reach remote code execution.
Below: what the flaw is, who is exposed, how to find every Java runtime you run, a safe lab check, the fixed builds and how to prove the fix is live.
Key takeaways
- Affected: Java 17, 21, 25 and 27 at or below 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3 and 27.0.1.0.3 (OpenJDK), on x86-64 processors with AVX-512 VBMI (Red Hat RHSB-2026-018). Java 8 and 11 are not marked.
- Fixed: the advisory prints no fixed version strings. OpenJDK's update repositories tag the next releases as 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, and vendors name their own fixed builds on top of those (see the table below).
- Restart, then verify the version inside each running JVM, not only on disk.
- Until then, Red Hat and Calif state that
-XX:-UseBASE64Intrinsicsremoves the vulnerable code path.
What is Java4Shell, in plain words?
Base64 turns binary data into text. Java applications decode it all the time: HTTP Basic credentials, SAML messages, tokens, file uploads and MIME email parts. To do that faster, HotSpot's C2 just in time compiler swaps the Java decoding loop for a hand written machine code routine, called an intrinsic, once a method has run often enough (Calif).
On x86-64 processors with the AVX-512 VBMI instruction set, that intrinsic handles the last few characters of the input with a 64 byte masked write. Calif's write-up explains that for certain short padded tails the routine computes a negative output length, the mask ends up allowing all 64 bytes, and the write runs past the end of the output array. Java then rejects the input as invalid and throws IllegalArgumentException, but by then the neighbouring heap memory may already be changed (Calif). GitHub's advisory database classifies it as CWE-122, heap based buffer overflow (GHSA-6g7j-4xh3-xq2q).
Calif reports that there is "no universal exploit": each target needs its own heap layout work, and a failed attempt can crash the JVM (Calif), which fits Oracle rating attack complexity as high. Oracle still says a successful attack "can result in takeover" of the Java runtime, reachable "through a web service" (CVE record). Calif also reports pre-authentication code execution in several widely deployed Java products in default configurations, and is holding back those exploit chains for now.
Who is affected?
You are exposed when all three of these are true at the same time.
The JDK build. The OpenJDK risk matrix puts bullets under 17, 21, 25 and 27 for this CVE and none under 8 or 11 (OpenJDK). Calif says the bug affects OpenJDK "from version 17.0.6 or newer" (Calif), and Red Hat says OpenJDK 8 and 11 "do not contain the vulnerable code path" (Red Hat). Oracle's own product list adds Oracle GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3, Oracle GraalVM Enterprise Edition 21.3.20.0.3 and one Java SE 8 build, 8u511b33-perf, the Oracle Java SE 8 performance build (Oracle Critical Security Patch Update, November 2026). Every downstream distribution built from OpenJDK inherits the code: Calif names Corretto, Temurin, the Microsoft Build of OpenJDK, Zulu, Liberica, SapMachine, Red Hat's builds and Oracle's builds (Calif).
The processor. Calif lists Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, and AMD EPYC and Ryzen Zen 4 or newer (Calif). Red Hat names common cloud families that are likely to qualify, including AWS C6i, M6i, R6i, C7i, M7i and R7a, Google Cloud C3, C3D, C4, C4D, N4, N4D, M3 and M4, and Azure D series v5 to v7 (Red Hat). Mixed instance generations mean one service can be exposed on some nodes only.
The input. Red Hat notes that HTTP Basic credentials, SAML artifacts, CSRF tokens and MIME encoded words are commonly decoded before authentication completes (Red Hat). Calif adds a client side case it was shown: a Java program that opens a TLS connection to a malicious server can be attacked even if it exposes no service (Calif). So batch jobs and build agents that call out to the internet count too.
Android. Android apps run on the Android Runtime, not HotSpot (Android docs), and nothing in the advisory puts Android in scope.
As for exploitation, when we checked on 18 November the CVE was not in CISA's Known Exploited Vulnerabilities feed (catalog version 2026.11.17), and the CISA enrichment in the NVD record recorded exploitation as "none" at 21:53 UTC on 17 November. CISA published an alert on 17 November that recommends patching and inventorying Java runtimes, including those bundled in third party applications, container images and appliances.
How do you check whether you are exposed?
Work through four places: hosts, running processes, container images and build systems. The commands below only read. The processor check is Calif's; the other commands in this section are our suggestions, built on standard JDK, Docker and Kubernetes tooling, not vendor instructions.
Is the processor in scope?
On Linux, Calif's check needs all four flags in the output (Calif):
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
Containers see the host's processor, so run it once per node type, not per image.
Which JDKs are installed on a host?
Every JDK and jlink runtime image carries a release file at its root. Finding those files catches runtimes that are not on the PATH, including ones bundled inside vendor products:
# every Java runtime on the box, with vendor and exact build
find / -xdev -type f -name release 2>/dev/null \
| xargs grep -l '^JAVA_VERSION=' 2>/dev/null \
| while read f; do echo "== $f"; grep -E '^(JAVA_VERSION|JAVA_RUNTIME_VERSION|IMPLEMENTOR)=' "$f"; done
# and every java launcher, in case a runtime lacks a release file
find / -xdev -type f -path '*/bin/java' 2>/dev/null
Repeat with the right mount points if you use separate volumes, since -xdev stays on one filesystem.
Which version is each running JVM actually using?
The version on disk and the version in memory differ until a restart. Ask the process:
jcmd -l # list local JVMs
jcmd <pid> VM.version # build the process is running
jcmd <pid> VM.flags | tr ' ' '\n' | grep -E 'UseBASE64Intrinsics|UseAVX'
readlink -f /proc/<pid>/exe # which java binary it started from
Which container images carry Java?
Check images without running them. Create a stopped container, list its files and read the release file:
img=registry.example.com/team/app:tag
cid=$(docker create "$img")
docker export "$cid" | tar -tf - | grep -E '(^|/)release$|/bin/java$'
docker cp "$cid":/opt/java/openjdk/release - | tar -xO # use the path found above
docker rm "$cid"
For what is deployed, list every image in the cluster, then repeat the check per unique image:
kubectl get pods -A -o jsonpath='{range .items[*]}{range .spec.containers[*]}{.image}{"\n"}{end}{end}' | sort -u
Also search your Dockerfiles for Java base images, because a fix only reaches you when the image is rebuilt:
grep -rEn --include='Dockerfile*' --include='*.dockerfile' \
'^FROM .*(jdk|jre|java|temurin|corretto|zulu|openjdk|liberica|sapmachine|graalvm)' .
What about CI and build agents?
Build agents run Java too: Maven, Gradle, Jenkins agents and test suites. Search pipeline files for pinned Java versions and toolchains:
grep -rEn 'java-version|setup-java|languageVersion|toolchain|JAVA_HOME|jdk:' \
.github .gitlab-ci.yml Jenkinsfile azure-pipelines.yml build.gradle* pom.xml 2>/dev/null
Then run the host checks above on self hosted runners and on any build agent image. Hosted runners are updated by their provider on its own schedule, so pin the version your build uses and check what it resolved to in the job log.
How do you verify the flaw safely in a lab?
A version check answers the question for production. If you want to see the behaviour change, for example to confirm a vendor build or the mitigation flag, do it in a lab with a bounded test.
Calif published a self contained check in the PoC section of its write-up. It warms the decoder until C2 uses the intrinsic, then decodes one malformed input into a 4,096 byte array that the program owns, so "every write lands inside a real array". It uses no network and attempts no code execution. On an affected JDK it prints the runtime version, rejected=true changed=62 first=50 last=111 and REPRODUCED; otherwise it prints NOT REPRODUCED and exits with status 1. We link to it rather than copy it; read it before you run it.
The setup we suggest:
- Use a lab x86-64 machine or VM that passes the processor check above. A laptop with Apple silicon or any ARM64 host cannot show the bug.
- Pull two images of the same Java line from your normal vendor: one at or below the affected version and one at the fixed version. Pin both by digest.
- Save Calif's check as
Java4ShellCheck.javain an empty directory and run it in each image with networking off. Java 11 and later can run a single source file directly:
for img in "$UNPATCHED_IMAGE" "$PATCHED_IMAGE"; do
echo "=== $img"
docker run --rm --network none --read-only -v "$PWD":/w:ro -w /w \
--entrypoint java "$img" -version
docker run --rm --network none --read-only --tmpfs /tmp -v "$PWD":/w:ro -w /w \
--entrypoint java "$img" Java4ShellCheck.java
done
- Optionally run the unpatched image again with
-XX:-UseBASE64Intrinsicsadded before the file name. With the intrinsic off, the Java code path does the decoding, so we would expectNOT REPRODUCED. That is a quick way to check that the interim flag is respected by your build.
Keep this away from production and from any internet facing system.
How do you fix it?
Move every affected runtime to a fixed build from the vendor you already use, then restart everything that runs on it.
Upstream OpenJDK. The advisory says the listed vulnerabilities "were fixed in this release" and gives the affected versions as "27.0.1.0.3, 25.0.5.0.3, 21.0.13.0.3, 17.0.21.0.3, 11.0.33, 8u512, and earlier" (OpenJDK). That list covers every CVE in the advisory; for CVE-2026-114938 the risk matrix marks only 17, 21, 25 and 27. The advisory does not print the fixed version strings. The fixed versions below come from OpenJDK's release tags and each vendor's own notes, not from the advisory text. OpenJDK's update repositories tag the following release on each line as jdk-17.0.21.1, jdk-21.0.13.1, jdk-25.0.5.1 and jdk-27.0.1.1. Each of those releases contains a change titled "8393212: Base64 optimization improvements" in the x86-64 stub generator. OpenJDK has not publicly tied that change to the CVE, so treat the release, not the single commit, as the fix.
Vendor builds. Use your vendor's page, because build numbers differ:
| Vendor | Fixed builds named by the vendor | Source |
|---|---|---|
| Amazon Corretto | 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4, each listing CVE-2026-114938 | Corretto 27 changelog, Corretto 21, Corretto 17, Corretto 25 |
| Azul Zulu | November 2026 update for Zulu 27, 25, 21 and 17, built on OpenJDK 27.0.1.1+4, 25.0.5.1+2, 21.0.13.1+2 and 17.0.21.1+2 | Azul release notes |
| Oracle Java SE, Oracle GraalVM | November 2026 Critical Security Patch Update; patch details in My Oracle Support note CPU435 | Oracle |
| Red Hat build of OpenJDK, RHEL and UBI | Red Hat rates it Critical and says it is expediting fixes; rebuild containers when base images update | Red Hat RHSB-2026-018 |
| Eclipse Temurin, Microsoft Build of OpenJDK, others | When we checked on 19 November, these vendors' pages did not yet name a fixed build; watch them for builds on the OpenJDK releases above | Adoptium, Microsoft |
Products that bundle their own JVM. Red Hat's advice is to update or apply the flag "via the product vendor's supported path rather than patching the JVM independently" (Red Hat).
Order of work. Red Hat says to prioritise internet facing applications and authentication services (Red Hat), and CISA's alert also puts internet facing systems first (CISA).
What can you do until you can patch?
Red Hat and Calif both state that either JVM flag removes the exposure (Red Hat, Calif):
-XX:-UseBASE64Intrinsicsturns off the accelerated Base64 code only. Red Hat calls this the preferred option.-XX:UseAVX=2turns off AVX-512 entirely. Use it only on x86-64. Both sources warn that a JVM on ARM will not start with it.
The easy way to reach every JVM in a container is the JAVA_TOOL_OPTIONS environment variable, which the JVM reads at start. That is our suggestion, not a vendor instruction, and you should check with jcmd <pid> VM.flags that the flag took effect, because some launchers replace the environment. Red Hat is clear that this is "an interim measure only": patch, then remove the flag.
CISA also lists compensating controls: restrict and validate Base64 input at the application boundary, enforce input size limits and limit unauthenticated access (CISA). Our note on those: Calif shows the corruption is triggered by short inputs, so a size cap alone will not stop it, and Calif reports that proxy request buffering is "not a general mitigation" either (Calif). Use WAF rules and strict format checks as stopgaps on top of the flag, never instead of it.
How do you confirm the fix?
Our suggested checks for every service:
- The running version.
jcmd <pid> VM.versionshows a fixed build, orjava -versioninside the running container does. The version file on disk is not enough. - The restart happened. Compare the process start time with the time the new JDK was installed:
ps -o lstart= -p <pid>. A process older than the install is still on the old code. - The image changed. For Kubernetes, the image digest in the pod status (
kubectl get pod <name> -o jsonpath='{.status.containerStatuses[*].imageID}') should match the rebuilt image, not just the tag. - No stray runtimes are left. Rerun the
releasefile search on hosts and images. - The lab check flips. If you ran the lab check, the patched image prints
NOT REPRODUCEDon the same VBMI host where the unpatched one printedREPRODUCED. - The flag is gone. Once patched, remove the interim JVM flag.
For detection while you work, CISA suggests watching for unexpected JVM crashes, rogue runtimes and suspicious Java processes (CISA). Calif notes that a mistimed attempt can crash the JVM (Calif). Our suggestion from that: treat new hs_err_pid*.log crash files and restart loops on internet facing Java services as worth a look, alongside spikes of IllegalArgumentException from Base64 decoding on login or upload endpoints. If you find a crash you cannot explain on an affected build, preserve the crash log and heap dump before restarting, and rotate secrets that lived in that JVM's memory, because Calif describes a heap read capability before any code execution.
What to do in your own stack
The JDK fix is out, so the remaining delay is on your side. Our suggested steps:
- Inventory every Java runtime. Hosts, images, CI agents and bundled runtimes, using the
releasefile search above. - Rebuild on patched base images. A new base image does nothing until every image built on it is rebuilt and redeployed. Trigger rebuilds of all children of a Java base image when it changes.
- Pin and verify JDK builds. Pin base images by digest and JDK downloads by version and vendor checksum.
- Find where untrusted Base64 meets the decoder. Search your own code for
Base64.getDecoder,getMimeDecoderandgetUrlDecoder, then trace which calls take request data before authentication. - Use WAF rules and input limits only as stopgaps. Label them as temporary in your change records so they are reviewed after the patch lands.
Fix it without waiting for upstream
Whatever the vulnerability, most of the risk sits in two gaps. The first is the time between a fix being published and that fix actually running in your production builds. The second, and worse, is the time before any fix exists at all, while a maintainer works out a patch and a release schedule. Waiting through both gaps is a habit, not a requirement. Safeguard gives teams three ways to close them.
1. Autonomous remediation: pull requests, not tickets
When a fixed version exists, Griffin, Safeguard's security model, opens a policy gated pull request that moves the affected dependency to the safe version, and your own CI runs your tests on it before anyone merges. You can run it on one repository or in bulk across every project that carries the vulnerable version. Remediation categories include dependencies, licenses, security posture and findings, and each one is set separately. Reachability analysis ranks the vulnerable code paths your application actually calls first, so the first pull requests you merge are the ones that matter most. Auto-merge is a separate switch and stays off by default, so your team decides what merges on its own and what still needs a human approval.
2. Gold Open Source: the safe version in seconds, free
gold.safeguard.sh is free and needs no login. Search any CVE or package to see affected and fixed versions, CVSS, EPSS, CISA KEV status and a recommended safe version, or use the "Am I affected?" checker. The same data is available through a free read API, README status badges and RSS threat feeds.
3. Gold Registry: start from components that are already fixed
Safeguard Gold rebuilds patched versions of open-source packages and images from source, signs each build, attaches an SBOM, SLSA provenance and VEX, and serves them from registry.safeguard.sh to your organization. Every Gold artifact is held continuously to zero exploitable critical or high CVEs and a completed license check, with signed build provenance (signed with Safeguard's key and verifiable with cosign, SLSA Build Level 3 as the design target) and a public evidence page you can hand to an auditor. An artifact loses its Gold badge if it regresses. Teams can point their own package directory at the registry so hardened equivalents resolve without changing how developers install anything.
When upstream has no fix yet, or will not ship one, Safeguard first works to get the fix accepted upstream. If the issue is severe or upstream will not move, Safeguard builds a fork, fixes the vulnerability there and publishes a hardened Gold build, so you are not stuck on a maintainer's release schedule. You can also request a hardened build of a specific package. Ask which packages it covers before you plan around it.
| Your situation | What to use |
|---|---|
| A fixed version exists | Autonomous remediation opens the upgrade pull request; Gold Open Source confirms the safe version |
| You need to know today whether you are affected | Gold Open Source lookup and "Am I affected?" checker, free and without login |
| You want vulnerable versions to stop shipping | Safeguard policies and gates in CI |
| Upstream has no fix yet, or will not ship one | A custom Gold request; fork and patch |
| You want to start clean on new projects | Pull hardened components and images from Gold Registry |
One honest limit: when the vulnerable code lives in a vendor appliance, a hosted service or an operating system runtime you do not build yourself, the fix still has to come from that vendor or distribution. The steps above apply to the open source dependencies and container images you build and ship, which is where most teams carry the largest and least tracked share of their exposure.
Where does Safeguard fit?
Calif found and reported this vulnerability, and the fix comes from OpenJDK and the JDK vendors. Safeguard helps with the work around it:
- Knowing where Java runs. Asset Discovery tracks asset classes across your estate, including source repositories, container images in registries and packages, and Safeguard reads container images, Linux packages, disk and VM images and existing SBOMs.
- Stopping old images at the gate. Container image scanning in CI scans the image each pipeline builds, per environment, and can fail the build on vulnerabilities.
- Rebuilding without waiting for a release. Self-Healing Containers rebuild and redeploy container images to pick up patches for new CVEs without waiting for the next feature release.
See how Safeguard would help
This demo shows a dependency inventory built from a project's manifests, the starting point for knowing which services and images to rebuild.
Click through it at your own pace, or open it full screen. To try it on your own projects, download Safeguard or start with the CLI documentation.
Quick check
Your servers run Java 21 on AWS Graviton (ARM64). Are you exposed to CVE-2026-114938?
Not known to be. Calif and Red Hat say ARM64 systems are not known to be affected, because the bug is in an x86-64 AVX-512 VBMI code path. Patch anyway when you can: the same OpenJDK release fixes other CVEs.
You installed 21.0.13.1 on a host yesterday. Is the service on it fixed?
Only if the JVM restarted afterwards. Check with jcmd and the process start time. A JVM keeps running the code it loaded at start.
The lab check prints NOT REPRODUCED on an unpatched image. Is that build safe?
Not necessarily. On a processor without AVX-512 VBMI, or on ARM64, the vulnerable path never runs, so every build prints NOT REPRODUCED. Run the processor check first.
Sources
- OpenJDK Vulnerability Advisory, 17 November 2026
- Calif: Java4Shell, write-up by Quang Luong (17 November 2026)
- CVE-2026-114938 record (Oracle CNA)
- NVD: CVE-2026-114938
- GitHub Advisory Database: GHSA-6g7j-4xh3-xq2q
- Oracle Critical Security Patch Update, November 2026
- Red Hat security bulletin RHSB-2026-018 and CVE page
- CISA alert: Critical Java Vulnerability Requires Immediate Patching (17 November 2026)
- OpenJDK jdk17u, jdk21u, jdk25u and jdk27u release comparisons
- Amazon Corretto 27 changelog
- Azul Zulu November 2026 release notes
- oss-security post on CVE-2026-114938 (17 November 2026)
- Android Runtime documentation