ENGINEERING NOTES / SECURITY
Java4Shell: how to check and protect Java and Keycloak deployments
A practical response to CVE-2026-114938: check the Java runtime and CPU, mitigate Keycloak, verify live JVM flags, and deploy a vendor-confirmed fix.

If you operate Keycloak, check the Java runtime underneath it today. In its 18 November 2026 advisory, the Keycloak team reports that researchers demonstrated remote code execution before authentication through Java4Shell, CVE-2026-114938. A login screen therefore does not establish that an instance is protected.
What changed on 19 November
Keycloak has shipped a patched server image. At 08:00 UTC on 19 November, the project confirmed that 26.8.2-3 includes Red Hat OpenJDK 21.0.13.1, which fixes CVE-2026-114938. Keycloak also refreshed the 26.8.2, 26.8, and latest tags. The earlier x86-64 images 26.8.2-1 and 26.8.2-2 bundled an affected build. Keycloak advisory.
If your deployment already specifies 26.8.2, a running pod can still be serving the older image. Pull the patched server image, record its digest, and roll it out to every replica. Check the image digest and Java build on each replacement. If you also run the Keycloak Operator, verify its own runtime separately. Keep the temporary mitigation on affected processes until you can verify their replacement.
For teams that package their own Java services, Eclipse Adoptium lists the following fixed Temurin builds. Check availability for your platform and image in the release tracker. Adoptium security guidance.
| Java release | Fixed Temurin build |
|---|---|
| 17 | 17.0.21.1+2 |
| 21 | 21.0.13.1+2 |
| 25 | 25.0.5.1+2 |
| 27 | 27.0.1.1+4 |
Spring Boot with Reactor Netty: Calif reported remote code execution in a sample Spring Boot application. That finding establishes exposure for the sample. For your own WebFlux service, check the deployed JVM, CPU and whether untrusted input reaches the affected JDK decoder. The choice of Netty alone cannot settle that assessment. Calif disclosure and Red Hat exposure conditions.
What Java4Shell affects
The flaw is in OpenJDK’s accelerated java.util.Base64.Decoder. Malformed input can corrupt memory when the JVM uses the affected x86-64 implementation. Depending on the application path, the result can include a process crash or remote code execution. Red Hat’s security bulletin identifies the following exposure conditions:
| Check | Condition to investigate |
|---|---|
| Runtime | An unpatched OpenJDK build from 17.0.6 onward, including affected 21 and 25 builds |
| CPU | x86-64 with AVX-512 VBMI exposed to the JVM |
| JVM configuration | The accelerated Base64 path remains enabled |
| Application input | Attacker-controlled Base64 reaches the standard decoder |
Red Hat says OpenJDK 8 and 11 lack this vulnerable path, and ARM64 or x86-64 systems without AVX-512 VBMI are not known to be affected. Treat that as scope for this CVE, not a reason to stop normal security updates.
Because this lives in the runtime, add bundled JVMs and container images to the investigation. Updating an application dependency cannot establish that the Java process has been fixed.
Build an inventory of actual deployments
Our recommended incident worksheet has one row per deployment, with the runtime vendor and full build, image digest, node or VM, CPU feature result, effective mitigation flag, owner, and patch evidence. Separate production, staging, background workers, and disaster recovery instances.
For a Linux host, check for the relevant CPU feature:
grep -m1 '^flags' /proc/cpuinfo | grep -w avx512vbmi
Run this on the host or VM executing the workload. In Kubernetes, identify its current node first:
kubectl -n identity get pods -o wide
Check every node eligible to receive the workload. Otherwise, a reschedule can invalidate your assessment. Record missing or inaccessible evidence as unknown, then investigate it; an unsuccessful check is not proof of safety.
For containerized Keycloak, inspect the bundled Java build:
kubectl -n identity exec example-kc-0 -c keycloak -- java -version
Replace the example namespace and pod name with yours. This starts a new Java process: it identifies the runtime in that container but does not prove which options the existing server received. For host installations, check the Java executable selected by the service configuration, which may differ from your shell’s default.
Apply the temporary JVM mitigation
Red Hat recommends -XX:-UseBASE64Intrinsics as the preferred interim measure. It disables the affected Base64 acceleration while retaining other AVX-512 optimizations. Its alternative, -XX:UseAVX=2, disables AVX-512 more broadly and must not be applied to ARM64 JVMs, where the option can prevent startup. These are temporary measures pending a patched runtime. Source: Red Hat mitigation guidance.
For Keycloak started from its distribution directory in a shell:
export JAVA_OPTS_APPEND="${JAVA_OPTS_APPEND:+$JAVA_OPTS_APPEND }-XX:-UseBASE64Intrinsics"
./bin/kc.sh start
Retain your normal startup arguments. For systemd, configure the service environment and restart the service; a shell export will not change it. Containers must be recreated or rolled out with the updated environment. Preserve existing JVM options. Source: Keycloak’s mitigation instructions.
For an Operator-managed server, the Keycloak advanced configuration guide supports custom environment variables through spec.env. Merge this fragment into the existing Keycloak resource, appending to any existing JAVA_OPTS_APPEND value:
spec:
env:
- name: JAVA_OPTS_APPEND
value: "-XX:-UseBASE64Intrinsics"
Keep its database, TLS, hostname, and other settings. Check that reconciliation replaces every server pod. Make the change in the configuration source your deployment process owns so the next release retains it.
The Operator has a separate JVM. Keycloak’s advisory specifies JDK_JAVA_OPTIONS for that process; the server’s JAVA_OPTS_APPEND does not configure it. Assess and update both, preserving existing options and using the OLM Subscription configuration where applicable. Source: Keycloak Operator guidance.
Verify the running JVM
Use jcmd against the live process. Oracle documents VM.flags -all for inspecting JVM flags; run the tool in the target environment with the same effective user and group as the application. Source: Oracle’s jcmd reference.
List processes inside the Keycloak container:
kubectl -n identity exec example-kc-0 -c keycloak -- jcmd -l
Then substitute the actual Keycloak PID:
kubectl -n identity exec example-kc-0 -c keycloak -- \
jcmd <keycloak-pid> VM.flags -all | grep -F UseBASE64Intrinsics
Confirm that UseBASE64Intrinsics is false on every restarted JVM. A variable visible in a manifest is insufficient evidence. Source: Keycloak verification guidance.
Save the result alongside each pod’s image digest and restart time. If attach tooling is unavailable, record the verification gap and arrange a supported diagnostic method before closing the task. Do not run an exploit against production as a health check.
Deploy and prove the permanent fix
Oracle’s November 2026 security advisory includes CVE-2026-114938. Use your runtime or product vendor’s release notice to identify the fixed build for your distribution; an Oracle version string is not a universal minimum across vendors and backports.
For custom images, rebuild with the fixed Java package or base image, publish a new digest, and replace the running workloads. Updating Java on a Kubernetes node does not update a JVM packaged inside a container. For vendor products, follow their supported update path.
Our recommended completion evidence is:
- A vendor statement covering the CVE and the exact runtime build you deployed.
- Runtime and image evidence from every replacement instance, including standby capacity.
- Successful login, token refresh, and the federation flows your deployment uses.
- A rollback image that also carries the fix or the verified mitigation.
Keep the workaround until the fixed deployment is verified, then remove it in a controlled rollout. Continue following the Keycloak advisory for updated image guidance.
If your team needs help mapping Java runtimes across hosts and Kubernetes workloads, CloudGuys can help with security readiness. Bring the runtime inventory and rollout evidence so the review starts with the systems actually running.
A FRESH PERSPECTIVE ON YOUR CLOUD
Great engineering starts
with a good conversation.
Let’s talk about what’s working, what’s slowing you down, and what comes next.
Talk to an engineer ↗