Checking for Java4Shell (CVE-2026-114938): from exposure conditions to a Kubernetes stopgap
On November 17, 2026, the security firm Calif disclosed a memory corruption flaw in OpenJDK’s Base64 decoder under the name Java4Shell. It is tracked as CVE-2026-114938. The researchers also published demonstrations of unauthenticated remote code execution against products such as Keycloak, Jira, Confluence, and Jenkins.
The bug isn’t in application code. It sits in CPU optimization code inside the JVM, so the same JDK image may or may not be affected depending on the CPU of the node it runs on. This article walks through how someone running Java workloads on Kubernetes can check exposure and apply a stopgap until images are rebuilt. It doesn’t cover the details of the attack technique.
At a glance
Section titled “At a glance”To decode Base64 quickly, the JVM uses dedicated code (an intrinsic) built on the CPU’s AVX-512 instructions. When that code handles input with malformed padding (=), it overwrites memory past the end of the buffer. The damage happens before the Java code gets a chance to throw an exception for the invalid input.
According to Red Hat’s bulletin, an attack requires all four of these conditions.
| Condition | Affected | Not affected |
|---|---|---|
| JDK version | Unpatched builds of OpenJDK 17.0.6 and later (including 21 and 25) | OpenJDK 8, 11 |
| CPU | x86-64 with AVX-512 VBMI | ARM64, x86-64 without VBMI |
| JVM options | Default settings that don’t lower the AVX level | JVMs started with -XX:UseAVX=2 or lower |
| Input | Attacker-supplied Base64 decoded with java.util.Base64.Decoder | No external Base64 decoded |
The last condition is broader than it looks. HTTP Basic auth headers, SAML messages, CSRF tokens, and MIME encoded words are all Base64, and they are usually decoded before authentication completes. Red Hat states that the attack works in default configurations without any special setup.
Affected versions and fixed builds
Section titled “Affected versions and fixed builds”The OpenJDK advisory marks this CVE as affecting the 17, 21, 25, and 27 release lines. The last affected versions are 27.0.1.0.3, 25.0.5.0.3, 21.0.13.0.3, and 17.0.21.0.3. The CVSS 3.1 score is 8.1. Calif rated it 9.2 under CVSS 4.0.
| Release line | Oracle Java SE fixed build | Other confirmed fixed builds |
|---|---|---|
| 17 | 17.0.21.1 | Amazon Corretto 17.0.21.1.2 |
| 21 | 21.0.13.1 | Check each distribution’s advisory |
| 25 | 25.0.5.1 | Check each distribution’s advisory |
| 27 | 27.0.1.1 | Check each distribution’s advisory |
For Eclipse Temurin, Azul Zulu, Red Hat build of OpenJDK, and Linux distribution packages, check each vendor’s advisory to confirm that a build includes the fix for CVE-2026-114938. Red Hat says RHEL 8, 9, and 10 and Red Hat build of OpenJDK 17, 21, and 25 are affected and that it is expediting fixes. Container images based on RHEL or UBI need to be rebuilt once the base images are updated.
Check 1: the JDK version of your workloads
Section titled “Check 1: the JDK version of your workloads”Check the Java version inside running Pods. The following example walks the Pods in one namespace and prints the first line of each.
for p in $(kubectl get pods -n my-app -o name); do echo "== $p" kubectl exec -n my-app "$p" -- java -version 2>&1 | head -n 1doneThis won’t work if java isn’t on the image’s PATH or the image has no shell. In that case, look up the JDK package and version in the image’s SBOM or in your image scanner’s results. For products that ship with a bundled JDK, such as Jenkins, Keycloak, and Elasticsearch, look at the JDK version inside, not the product version. Generating SBOMs is covered in the SBOM and image signing post, and running registry scans in the image vulnerability management post.
Check 2: AVX-512 VBMI support on node CPUs
Section titled “Check 2: AVX-512 VBMI support on node CPUs”On Linux, check the CPU flags in /proc/cpuinfo. If the output is avx512vbmi, the CPU supports the instruction set. If nothing comes back, the node falls outside the affected conditions.
grep -o avx512vbmi /proc/cpuinfo | head -n 1On Kubernetes nodes, you can run the same command in a node debug Pod.
kubectl debug node/my-node -it --image=busybox -- grep -o avx512vbmi /proc/cpuinfoOn clusters with Node Feature Discovery installed, CPU flags are attached as node labels in the form feature.node.kubernetes.io/cpu-cpuid.<flag>. Searching the labels saves you from visiting nodes one by one.
kubectl get nodes -o json | grep -i avx512vbmiRed Hat’s bulletin lists Intel Ice Lake, Sapphire Rapids, Emerald Rapids, and Granite Rapids, and AMD Zen 4, Zen 5, and Zen 6 as the affected CPUs. In the cloud, the same instance family can run on different CPUs depending on its generation, so checking the actual node’s flags is more accurate than going by the family name. ARM64 node pools aren’t affected.
Stopgap: turning off the vulnerable path with a JVM option
Section titled “Stopgap: turning off the vulnerable path with a JVM option”The complete fix is moving to a patched JDK. If you can’t rebuild images right away, turn off the vulnerable code path with a JVM startup option.
| Option | Effect | Caution |
|---|---|---|
-XX:-UseBASE64Intrinsics | Turns off only the accelerated Base64 code | Recommended option. Apps that decode a lot of Base64 may slow down |
-XX:UseAVX=2 | Turns off AVX-512 instructions entirely | Other optimizations go with it. ARM64 JVMs don’t recognize this option and fail to start |
On Kubernetes, setting it through the JAVA_TOOL_OPTIONS environment variable applies it without changing the image. The JVM reads this variable at startup and treats it like command-line options.
spec: template: spec: containers: - name: app env: - name: JAVA_TOOL_OPTIONS value: "-XX:-UseBASE64Intrinsics"You can also set it with a command. Changing an environment variable changes the Pod template, which triggers a rolling update.
kubectl set env deployment/my-app -n my-app JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"Things to check when you apply it:
- If you already use
JAVA_TOOL_OPTIONS, append the option to the existing value instead of overwriting it. - The option takes effect only after the JVM restarts. Make sure new Pods have come up.
- When the JVM reads this variable, it writes a line starting with
Picked up JAVA_TOOL_OPTIONS:to standard error. Finding that line in the logs tells you the option was passed.
kubectl logs deployment/my-app -n my-app | grep 'Picked up JAVA_TOOL_OPTIONS'- On clusters that mix x86-64 and ARM64 nodes, don’t apply
-XX:UseAVX=2across the board. Pods scheduled on ARM64 nodes won’t start. - For commercial products that bundle their own JDK, add the option or update through the path the vendor documents. The Keycloak project also has an open issue proposing to add this option to its default startup scripts.
After applying the stopgap, still rebuild images on a fixed build, and remove the option once that rollout is done.
Where to start
Section titled “Where to start”Services that are exposed to the internet and decode Base64 before authentication come first. Qualys recommends this order.
- Internet-facing identity providers (Keycloak and similar)
- Internet-facing Jira, Confluence, Jenkins, and Artifactory
- Other external Java services that handle logins, tokens, or file uploads
- Internal Java systems (Kafka, Solr, Elasticsearch, and so on)
Request buffering in a reverse proxy may break some exploit chains, but don’t count on it as a general defense.
Limits
Section titled “Limits”- The versions and fixed builds in this article reflect advisories checked on 2026-11-17. The Oracle 17 build was confirmed from its release notes, and the 21, 25, and 27 build numbers from Qualys’s summary. Fix status for distributions not in the table wasn’t confirmed.
- Node label names can vary with Node Feature Discovery settings, so the article searches the labels rather than naming one directly.
- The performance impact of the stopgap options varies by application and wasn’t measured.
- Whether an attack is possible depends on where an application decodes external Base64. This article covers only the conditions and the response; follow each vendor’s advisory for product-specific exposure paths.
References
Section titled “References”- OpenJDK Vulnerability Advisory: 2026/11/17
- Red Hat RHSB-2026-018
- Calif: Java4Shell technical analysis
- Oracle JDK 17.0.21.1 Release Notes
- Amazon Corretto 17.0.21.1.2 CHANGELOG
- Qualys: How to Find, Mitigate, and Patch Java4Shell
- Keycloak #55293: Mitigate OpenJDK Base64 intrinsic vulnerability
- Node Feature Discovery: Feature labels
- GeekNews summary (Korean)