Java4Shell (CVE-2026-114938): how to find it and fix it
Java4Shell, disclosed on 17 November 2026, is a heap overflow in OpenJDK's AVX-512 Base64 decoder that can lead to remote code execution. How to check whether a workload is exposed, what to patch, which JVM flags to set until you can, and how bifrost finds the workloads to fix first.
Hannes Ullman
bifrost security
TL;DR
- What it is: Java4Shell (CVE-2026-114938) is a memory-corruption bug in OpenJDK’s Base64 decoder that can lead to unauthenticated remote code execution. Calif rates it 9.2 under CVSS 4.0; OpenJDK lists 8.1 under CVSS 3.1.
- Who is exposed: workloads using an affected, unpatched Java build on x86-64 with the required AVX-512 features, where attacker-controlled input reaches the vulnerable decoder. That includes clients, not just servers. Affected builds include OpenJDK-derived releases from 17.0.6 and Oracle Java 8 Enterprise Performance Pack. Standard Java 8, Java 11 and ARM64 are not affected.
- What to do today: move to a fixed vendor build. If you cannot yet, start affected JVMs with
-XX:-UseBASE64Intrinsics. Restart or redeploy every affected JVM and verify its running configuration. - What runtime enforcement adds: in enforce mode, a tailored AppArmor profile denies post-exploitation operations outside its permissions, such as shell execution or credential-file access. It does not stop the in-memory exploit or remove access the application already needs. Patching is still urgent.
Are you exposed?
Check the running application, not just the Java version installed in its image. These four checks narrow the assessment; they do not establish a working exploit against your application.
| Condition | Potentially exposed when | How to check |
|---|---|---|
| Java build | The application uses an affected, unpatched vendor build, including affected Oracle Java 8 Enterprise Performance Pack builds | Identify the running JVM’s vendor and full build number, including bundled runtimes, and compare with that vendor’s advisory and backports |
| CPU | The JVM runs on x86-64 with avx512f, avx512bw, avx512vbmi and bmi2 available |
Check the CPU features visible in the workload’s execution environment, not just the physical host’s processor model |
| Intrinsic | The vulnerable AVX-512 Base64 path is enabled | Inspect effective JVM settings, including UseBASE64Intrinsics and UseAVX; disabling Base64 intrinsics or setting UseAVX=2 mitigates this path |
| Reachability | Attacker-controlled data reaches the affected decoder | Trace incoming requests, responses from external systems and other untrusted inputs; include Java clients making outbound connections |
On Linux, this command checks the first processor’s advertised flags in the environment where you run it:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
All four flags meet the hardware part of the check, not the full exposure assessment. Check each relevant execution environment, including other node pools or hosts where the workload can be scheduled. ARM64 is outside this vulnerability’s scope.
For the running JVM, use jcmd -l to identify the application process where JDK diagnostic tools and attach permissions are available. Then use jcmd <pid> VM.version, jcmd <pid> VM.command_line and jcmd <pid> VM.flags -all, replacing <pid> with that process’s ID. Run the tools as the application user in the appropriate container or process namespace. Inspect both UseBASE64Intrinsics and, on x86-64, UseAVX. If attach is unavailable, use your runtime’s supported diagnostics to verify the same information.
Running java -version from a shell can identify a different installation. Likewise, inspecting a newly launched JVM’s flags does not establish the settings of the application already running.
Do not limit the search to internet-facing servers. Calif also reports a client-side chain in which a Java program opens a TLS connection to a malicious server. No listening service is required. Proxy buffering interrupts some server-side chains, but not all: Calif names Elasticsearch and WebSocket traffic as exceptions. Neither proxy buffering nor a WAF is a general mitigation.
What to do now
Patching the JDK is the fix; the JVM flags below are stopgaps until you can.
- Upgrade to a fixed vendor build. See the OpenJDK advisory, then check your vendor’s release notes. Version numbers and backports differ between distributions.
- Rebuild and redeploy images. Update bundled JDKs as well as base images. A patched image does nothing for an old container that is still running.
- If you cannot patch yet, disable Base64 intrinsics. Start affected JVMs with
-XX:-UseBASE64Intrinsics, for example throughJAVA_TOOL_OPTIONS. This disables hardware-accelerated Base64 encoding and decoding and may reduce performance for Base64-heavy workloads. - Alternatively, disable AVX-512.
-XX:UseAVX=2also mitigates the vulnerable path on x86-64. ARM JVMs do not recognise this flag and fail to start, so do not apply it across a mixed-architecture fleet. - Restart and verify every affected JVM. Changing
JAVA_TOOL_OPTIONSdoes not alter existing processes. After the rollout, check the running JVM’s build and effective flags, and confirm that no old replicas or workers remain. - Reduce exposure while rolling out the fix. Restrict unnecessary access to affected services and management interfaces. Review outbound access too, especially where clients connect to untrusted destinations.
Fixed builds reported on 18 November 2026 by Aikido:
| Build | Java 17 | Java 21 | Java 25 | Java 27 |
|---|---|---|---|---|
| Oracle Java SE | 17.0.21.1 | 21.0.13.1 | 25.0.5.1 | 27.0.1.1 |
| Amazon Corretto | 17.0.21.1.2 | 21.0.13.1.2 | 25.0.5.1.2 | 27.0.1.1.4 |
Oracle’s Java 17 release notes confirm its 17 November release. Amazon’s CVE advisory links the fixed Corretto packages for Amazon Linux. Use your vendor’s current advisory for the exact package and platform, including Oracle Java 8 Enterprise Performance Pack builds, which this table does not cover.
What Java4Shell is
Java4Shell is an out-of-bounds heap write in the AVX-512 assembly used by HotSpot’s Base64 intrinsic. A length calculation mishandles malformed padding, causing a full 64-byte write past the intended output. Java rejects the input afterwards, but memory has already been corrupted. The Calif write-up explains how this becomes memory disclosure and, through further corruption, native code execution. Sensitive data can be exposed before code execution is achieved.
There is no universal payload. Calif reports unauthenticated chains against Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate, and authenticated chains against Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. Each depends on application-specific input paths and memory behaviour. As of 18 November 2026, Calif was withholding those chains, and Aikido reported no confirmed exploitation in the wild. Neither is a reason to delay patching.
How bifrost helps
The first question after a disclosure like this is where the affected JDK is running. bifrost answers it from the context it already holds.
For every build, bifrost knows what the image contains, where it runs and what it does when it runs. Active SBOMs are re-scanned through the day, and a new CVE is assessed against that context. For Java4Shell, that separates two groups:
- Running workloads that start an affected JDK. Patch these first. For each one, the answer leads with its protection status (whether a tailored profile is enforced), then where it runs, how exposed it is and what to do.
- Workloads that ship an affected JDK but never start it, for example a base image shared with services not written in Java. These come back as never loaded, with the evidence, and can follow in the regular rebuild.
bifrost tracks what is running, not what was deployed. As patched images roll out, workloads leave the list, and an old replica still running an affected build stays on it until it is gone.
bifrost tells you which workloads to check first. The CPU features, the JVM’s effective flags and whether untrusted input reaches the decoder still need the checks above.
Runtime enforcement limits the blast radius, not the exploit. In enforce mode, the kernel denies what the tailored profile does not permit, such as starting a shell or reading credential files. The memory corruption and code execution happen inside the process, out of the profile’s reach. The patch closes the hole, so start with the workloads bifrost puts first.
Tags
Do you know what's exploitable in your environment?
Deploy bifrost via Helm and it reads how every container is actually deployed, cutting your CVE list before a single line of code changes.