Containers

Patch Java4Shell CVE-2026-114938 in Docker and Kubernetes Images

Your hosts can be fully patched for Java4Shell while every Java container on them still runs a vulnerable JVM. A container carries its own JDK, so apt upgrade or dnf upgrade on the node does nothing for it, and the image your Dockerfile starts FROM decides whether CVE-2026-114938 can reach the service. eclipse-temurin was rebuilt on 20 November for amd64, but its arm64 17 and 21 Ubuntu tags still hold the October JDK.

Original content from computingforgeeks.com - post 191987

Below you will check which Java base images already carry the fix and find the vulnerable JVMs in running Docker containers and Kubernetes pods. Then you rebuild on a fixed base, patch UBI and Paketo-built Spring Boot images, and put a stopgap on the rest. The Java4Shell CVE-2026-114938 overview covers the bug itself. We ran all of it on 19 November 2026 on a Google Cloud c3 instance with Docker 29 and a kind cluster on Kubernetes 1.37, then re-pulled every Temurin tag on 20 November 2026 on an amd64 c3 and an arm64 t2a instance after the rebuild.

Which Java base images are fixed

A tag name tells you almost nothing here, because the floating tags kept their names across the fix and some vendors print three version fields for a four-field build. So we pulled each image, ran java inside it, and also ran the bounded trigger that Calif published with its Java4Shell write-up, which prints REPRODUCED when the JVM corrupts memory past a buffer. The first pass ran on 19 November around 09:00 UTC. We re-ran the Temurin, Tomcat, Maven, Gradle, Liberica and UBI rows with docker pull on 20 November between 20:13 and 20:20 UTC, on both architectures (the ubi9 17 and ubi10 runtimes on amd64 only), because the rebuild did not land the same way on both.

ImageJava build insideStatus
amazoncorretto:17, 21, 25 and 21-alpine17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2Fixed
gcr.io/distroless/java17, java21, java25-debian1317.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2Fixed
mcr.microsoft.com/openjdk/jdk:21-ubuntu, 25-ubuntu21.0.13.1+2, 25.0.5.1+2Fixed
azul/zulu-openjdk:21, sapmachine:2121.0.13.1+2Fixed
cgr.dev/chainguard/jre and jdk:latest, bitnami/java:latest27.0.1.1Fixed
eclipse-temurin:17-jre, 17-jdk, 21-jre, 21-jdk, 25-jre, 17-jre-alpine, 21-jre-alpine, 25-jre-alpine (linux/amd64)17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2Fixed, rebuilt 20 November
eclipse-temurin:25-jre, 21-jre-alpine, 25-jre-alpine (linux/arm64)21.0.13.1+2, 25.0.5.1+2Fixed, rebuilt 20 November
eclipse-temurin:17-jre, 17-jdk, 21-jre, 21-jdk (linux/arm64)17.0.21+9, 21.0.13+9Not fixed (old build, rebuild pending); arm64 CPUs cannot hit the bug
tomcat:latest (both architectures)25.0.5.1+2Fixed
tomcat:10-jre21, gradle:jdk2121.0.13.1+2 on amd64, 21.0.13+9 on arm64Fixed on amd64 only
maven:3-eclipse-temurin-21 (both architectures)21.0.13+9Vulnerable, trigger reproduced on amd64
bellsoft/liberica-runtime-container:jre-21-glibc21.0.13.1+5Fixed, rebuilt 19 November
Red Hat ubi9/openjdk-17-runtime, ubi9/openjdk-21-runtime, ubi10/openjdk-21-runtime17.0.21.1+2, 21.0.13.1+2Fixed, rebuilt 19 November (step 5 covers older pulls)
eclipse-temurin:8-jre, 11-jre1.8.0_512, 11.0.33Not affected

Every fixed image carries a .1 in the fourth version field, matching the upstream 17.0.21.1, 21.0.13.1 and 25.0.5.1 releases. Temurin itself published fixed Linux tarballs on 18 November, and the Docker images followed on 20 November once the Adoptium Update Dockerfiles pull request was merged and the official library rebuilt. Its readiness report explains the split we measured. For 17 and 21, the arm64v8 builds of the Ubuntu and UBI variants are marked pending an upstream binary, and our pulls showed the previous builds still published for that architecture. So the same tag now resolves to a fixed JDK on an Intel or AMD host and to the October JDK on Graviton, Ampere or an Apple Silicon laptop.

Fresh pulls of eclipse-temurin, Tomcat, Maven and Gradle images on amd64 showing the 21.0.13.1 and 17.0.21.1 fixed builds and the old Maven build

On the amd64 host every Temurin tag came back with a 20 November creation time and a four-field build. The odd one out is Maven, created at 06:10 that morning, hours before the Temurin rebuild reached Docker Hub.

Fresh pulls of the same Java images on arm64 showing Temurin 17 and 21 still on the October build, 25 and the 21 and 25 Alpine tags fixed, and no arm64 image for 17-jre-alpine

The same pull list on the arm64 host tells the other half. The Temurin 17 and 21 Ubuntu tags still carry an 11 November creation time and the three-field October build, and 17-jre-alpine did not pull at all.

Images built FROM eclipse-temurin inherit whatever their last rebuild picked up, which is why maven:3-eclipse-temurin-21, rebuilt at 06:10 UTC that morning, still ships 21.0.13+9 on both architectures. BellSoft and Red Hat both rebuilt their own runtime images on 19 November, so those two rows are clean now.

How much does the arm64 lag matter? Calif states that the vulnerable code is the x86-64 AVX-512 Base64 stub and that ARM64 CPUs are not affected, and the trigger agreed. On the arm64 instance the old eclipse-temurin:21-jre build printed changed=0 and NOT REPRODUCED. The risk on arm64 is procedural rather than exploitable. Your scanner will keep flagging 21.0.13+9, a developer who checks the tag from a MacBook will wrongly conclude the fix has not shipped, and a multi-arch image can pass review on one architecture while the other half carries the old JDK. Check the architecture before you trust a java -version result, which is what step 2 now does for both.

docker buildx imagetools inspect showing eclipse-temurin 17-jre-alpine published for linux/amd64 only

That failed arm64 pull is not a registry hiccup. The 17-jre-alpine index lists one linux/amd64 image plus its attestation and nothing for arm64, so Java 17 shops on Graviton have no Alpine escape hatch.

1. Check what CPU your containers see

The bug only fires on x86-64 CPUs with AVX-512 VBMI, where HotSpot swaps in a hand-written Base64 decoder. A container reads /proc/cpuinfo straight from the host kernel, so a throwaway Alpine container shows you exactly what a JVM on that node would see. Run it on each node type you have; we ran it on the lab host first.

docker run --rm alpine:3.24 sh -c 'grep -oE "(avx512f|avx512bw|avx512vbmi|bmi2)" /proc/cpuinfo | sort -u'

All four flags came back on the c3 instance, an Intel Xeon Platinum 8481C, so every Java container on this node is in the exposed group.

avx512bw
avx512f
avx512vbmi
bmi2

In Kubernetes, do not stop at one node. Which nodes can your Java pods land on? The scheduler puts a pod on whatever node has room, so a deployment that runs on an older node pool today can land on an Ice Lake, Sapphire Rapids or AMD Zen 4 node tomorrow. Treat the image as exposed if any node it can schedule onto shows all four flags. Arm64 nodes, such as Graviton or Ampere pools, never generate the vulnerable decoder.

2. Read the Java build inside each image

Ask the JVM, not the tag. This command works on every image in the table, including distroless and Chainguard images that have no shell, because it overrides the entrypoint with java itself and prints only the runtime version property:

docker run --rm --entrypoint java eclipse-temurin:21-jre -XshowSettings:properties -version 2>&1 | grep java.runtime.version

On 19 November Temurin answered with a three-field build, which is the vulnerable October release. A fixed image answers 21.0.13.1+2 or later in the same position, so you only need to read the fourth field. Since the 20 November rebuild, after a fresh docker pull the same command prints 21.0.13.1+2-LTS on an amd64 host and still prints the three-field build on arm64.

    java.runtime.version = 21.0.13+9-LTS

We also ran the published Calif trigger in each image to be sure the build number told the truth. On the 19 November eclipse-temurin:21-jre it reported 62 bytes changed outside the decoded output, and on amazoncorretto:21 nothing changed at all.

runtime=21.0.13+9-LTS
vm=OpenJDK 64-Bit Server VM
rejected=true changed=62 first=50 last=111
REPRODUCED

The trigger as published targets JDK 21 and newer, so it printed NOT REPRODUCED on the vulnerable Temurin 17 image too. Do not read that as a clean result. For Java 17, the build number is the test: 17.0.21+9 is vulnerable and 17.0.21.1 is fixed. The intrinsic flag looks identical on both, because the fix corrects the decoder instead of switching it off:

docker run --rm eclipse-temurin:17-jre java -XX:+PrintFlagsFinal -version 2>&1 | grep -E "UseBASE64Intrinsics|Runtime Environment"
docker run --rm amazoncorretto:17 java -XX:+PrintFlagsFinal -version 2>&1 | grep -E "UseBASE64Intrinsics|Runtime Environment"

Both report the intrinsic on by default, and only the build line separates the vulnerable Temurin image from the fixed Corretto one:

     bool UseBASE64Intrinsics                      = true                                      {product} {default}
OpenJDK Runtime Environment Temurin-17.0.21+9 (build 17.0.21+9)
     bool UseBASE64Intrinsics                      = true                                      {product} {default}
OpenJDK Runtime Environment Corretto-17.0.21.1.2 (build 17.0.21.1+2-LTS)

Those two lines came from the 19 November images. Since the rebuild, a freshly pulled amd64 eclipse-temurin:17-jre prints Temurin-17.0.21.1+2 in the same place.

Check the architecture before you read the build

Since 20 November a Temurin result means nothing until you know which architecture produced it. Docker pulls the variant that matches the host, so an amd64 build server and an arm64 laptop get different JDKs from the same tag. Pull fresh, then ask Docker which variant landed.

docker pull eclipse-temurin:21-jre
docker image inspect --format '{{.Architecture}}' eclipse-temurin:21-jre

To see both variants from one machine, list the manifest index. The amd64 entry carries the version annotation 21.0.13.1_2-jre-resolute and a creation time of 17:43 UTC on 20 November; the arm64 entry has a different digest and no new annotations, which is the old build.

docker buildx imagetools inspect eclipse-temurin:21-jre

Trimmed to the lines that matter, the index we pulled looked like this.

Digest:    sha256:d77e090ae1f6970c047b443c6f0a6c1358b0426d44432bb5a7753408cd43de0d
  Name:        docker.io/library/eclipse-temurin:21-jre@sha256:4a2ba00e587a149f39b98bf24f1bb674f21de1b5619947e274938b7afa2a697e
  Platform:    linux/amd64
    org.opencontainers.image.version:         21.0.13.1_2-jre-resolute
    org.opencontainers.image.created:         2026-11-20T17:43:48Z
  Name:        docker.io/library/eclipse-temurin:21-jre@sha256:4a541e56af0ae9a1ff20cdbf43e400864542116b0e7804b37f51be4c574f2057
  Platform:    linux/arm64/v8

The final word belongs to the JVM inside a running container, because that is what serves traffic. Start one from the image your service uses and run java -version in it with docker exec:

docker run -d --name app eclipse-temurin:21-jre tail -f /dev/null
docker exec app java -version
docker rm -f app

On the amd64 c3 instance we ran the same check against demo-app:temurin, the step 4 rebuild on that re-pulled tag, and it reported the fixed Temurin build.

openjdk version "21.0.13.1" 2026-11-17 LTS
OpenJDK Runtime Environment Temurin-21.0.13.1+2 (build 21.0.13.1+2-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.13.1+2 (build 21.0.13.1+2-LTS, mixed mode, sharing)

The same commands, run on the arm64 t2a instance, a few minutes later, returned the October build and an arm64 architecture.

openjdk version "21.0.13" 2026-10-20 LTS
OpenJDK Runtime Environment Temurin-21.0.13+9 (build 21.0.13+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.13+9 (build 21.0.13+9-LTS, mixed mode, sharing)
arm64

In Kubernetes, start from the node. The kubernetes.io/arch label tells you which variant a pod will pull, and kubectl exec reads the JVM in the running pod. We ran this on a kind cluster on the arm64 instance with one deployment on 21-jre and one on 21-jre-alpine, each created with kubectl create deployment:

kubectl create deployment api --image=eclipse-temurin:21-jre -- tail -f /dev/null
kubectl create deployment api-alpine --image=eclipse-temurin:21-jre-alpine -- tail -f /dev/null
kubectl get nodes -L kubernetes.io/arch
kubectl exec deploy/api -- java -version
kubectl exec deploy/api-alpine -- java -version

The node reported arm64, and the two pods on that one node disagreed. The Ubuntu-based tag still runs the October JDK there, while the Alpine tag was rebuilt for arm64. We trimmed each java -version to its runtime line and labelled it by deployment.

NAME                STATUS   ROLES           AGE   VERSION   ARCH
j4s-control-plane   Ready    control-plane   24s   v1.37.0   arm64
--- api
OpenJDK Runtime Environment Temurin-21.0.13+9 (build 21.0.13+9-LTS)
--- api-alpine
OpenJDK Runtime Environment Temurin-21.0.13.1+2 (build 21.0.13.1+2-LTS)

In a mixed cluster with both amd64 and Graviton node pools, one deployment can return two different builds depending on where each replica landed. Only replicas on amd64 nodes with AVX-512 VBMI (step 1) are exposed to Java4Shell.

Manifest index of eclipse-temurin 21-jre, the amd64 image architecture and java -version in a demo-app container built on eclipse-temurin 21-jre on amd64

Here is the amd64 check end to end in one terminal: the index digest, the local image resolving to amd64 under that same digest, and the running container answering 21.0.13.1+2.

kubectl showing an arm64 node and two pods on it, the Ubuntu Temurin pod on 21.0.13+9 and the Alpine pod on 21.0.13.1+2

And the Kubernetes side on the arm64 kind node: one node, two pods, two different JDK builds behind tags that differ only in the Alpine suffix.

3. Find vulnerable JVMs in running pods

Running containers matter more than the images in your registry, because a pod keeps the JVM it started with until it restarts. Our kind cluster ran four deployments in a shop namespace: an app on eclipse-temurin:21-jre, the same app on distroless and on Corretto, and a stock tomcat:10-jre21. The obvious first try, wrapping the check in a shell, fails on the distroless pod:

OCI runtime exec failed: exec failed: unable to start container process: exec: "sh": executable file not found in $PATH

Distroless, Chainguard and most hardened images ship no shell, and they are exactly the images you want covered. The loop below calls java directly through kubectl exec, so it needs nothing in the container except the JVM. Save it as java-inventory.sh:

kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{" "}{.spec.containers[0].name}{"\n"}{end}' |
while read -r ns pod ctr; do
  ver=$(kubectl exec -n "$ns" "$pod" -c "$ctr" -- java -XshowSettings:properties -version 2>&1 </dev/null |
        awk -F'= ' '/java.runtime.version/{print $2}')
  [ -n "$ver" ] && printf '%-8s %-28s %s\n' "$ns" "$pod" "$ver"
done

Run it with bash java-inventory.sh from any machine with cluster access. Pods without a JVM, including the whole kube-system namespace, drop out silently, and our four Java pods came back with two vulnerable builds:

shop     billing-6897dbd5b8-4ftds     21.0.13.1+2-LTS
shop     orders-f986c98d4-b7k9s       21.0.13+9-LTS
shop     payments-7d9f8ccc54-9n8sk    21.0.13.1+2-LTS
shop     web-854cff8d5d-qf6gf         21.0.13+9-LTS

The loop is quick, but you should know what it skips before you trust a short list:

  • Sidecars: it reads only the first container of each pod
  • Jobs and CronJobs that are not running right now
  • A JVM started from a JDK that is not on the PATH

The java on the PATH inside the image is the running JVM in almost every image you will meet. When you need proof of the process itself, attach an ephemeral debug container that shares the process namespace of the target container and read PID 1 directly.

kubectl -n shop debug payments-7d9f8ccc54-9n8sk --image=busybox:1.37 --container=jvmcheck --target=orders-java21-debian13 --profile=general -- sh -c 'ls -l /proc/1/exe; grep JAVA_RUNTIME_VERSION /proc/1/root/usr/lib/jvm/*/release'
kubectl -n shop logs payments-7d9f8ccc54-9n8sk -c jvmcheck

Busybox brings the shell the distroless image lacks, and it confirmed that the running JVM in the distroless pod is the fixed Temurin build Google ships in the image.

lrwxrwxrwx    1 root     root             0 Nov 19 09:06 /proc/1/exe -> /usr/lib/jvm/temurin-21-jre-amd64/bin/java
JAVA_RUNTIME_VERSION="21.0.13.1+2-LTS"

Change /usr/lib/jvm/* to /opt/java/openjdk for Temurin-based images, which is where the /proc/1/exe line will point. Ephemeral containers stay attached to the pod until it is replaced, so use this for spot checks, not for a fleet sweep.

4. Rebuild on a fixed base image

A new image is the permanent fix, and the build has to fetch a fresh base rather than reuse a cached layer. If your base is one of the fixed images, --pull picks up the rebuilt tag, and since 20 November that includes eclipse-temurin on amd64. We kept the base in a build argument so the same Dockerfile could be rebuilt on each architecture with a different tag:

ARG BASE=eclipse-temurin:21-jre
FROM ${BASE}
COPY Base64Trigger.class /app/
WORKDIR /app
CMD ["java", "Base64Trigger"]

Build with --pull so Docker checks the registry for a newer base, and --no-cache so no earlier layer survives. A plain rebuild that reuses last week’s base layer is the most common way to ship the old JDK again. Then run the result:

docker build --pull --no-cache -t demo-app:temurin .
docker run --rm demo-app:temurin

The demo app in this image is the Calif trigger itself, so its output doubles as the verification. On the amd64 c3 host, which has AVX-512 VBMI, the rebuilt image moved to the fixed Temurin build and the trigger no longer touched memory outside the buffer:

runtime=21.0.13.1+2-LTS
vm=OpenJDK 64-Bit Server VM
rejected=true changed=0 first=-1 last=-1
NOT REPRODUCED

The identical build on the arm64 t2a host still produced runtime=21.0.13+9-LTS, because --pull can only fetch what Docker Hub publishes for that architecture. Until Adoptium ships the arm64 binaries for 17 and 21, an arm64 build that has to show a fixed JDK needs another tag. The Alpine tag kept the JDK 21 line and came back fixed.

docker build --pull --no-cache --build-arg BASE=eclipse-temurin:21-jre-alpine -t demo-app:temurin-alpine .
docker run --rm demo-app:temurin-alpine

The first line of the output was runtime=21.0.13.1+2-LTS. These are your arm64 options and their limits.

  • 21-jre-alpine swaps glibc for musl, so test anything with native libraries
  • 25-jre stays on Ubuntu but is a major Java upgrade
  • There is no arm64 17-jre-alpine at all; the index lists linux/amd64 only
  • amazoncorretto:17 and 21 were fixed on arm64 when we checked

Pinning a digest helps on the amd64 side. FROM eclipse-temurin:21-jre@sha256:4a2ba00e587a149f39b98bf24f1bb674f21de1b5619947e274938b7afa2a697e locks a single-architecture build to the fixed amd64 image, so a cache or a mirror cannot hand you the old one. Never use it in a multi-arch build, because on an arm64 builder it pulls the amd64 image. Pinning the index digest d77e090a... still resolves to the October JDK on arm64, and that index digest will change when the arm64 rebuild lands, so plan to re-pin then. Because arm64 CPUs cannot reach the vulnerable stub, staying on the Ubuntu tag there and rebuilding when Adoptium catches up is a defensible choice; record it as an accepted finding so your scanner exceptions do not outlive the rebuild.

If you would rather leave Temurin, these other bases were fixed when we checked them on amd64 on 19 November:

  • gcr.io/distroless/java21-debian13: Temurin build, no shell
  • amazoncorretto:21 and 21-alpine: Corretto 21.0.13.1
  • mcr.microsoft.com/openjdk/jdk:21-ubuntu: Microsoft build 21.0.13.1
  • azul/zulu-openjdk:21 and sapmachine:21: 21.0.13.1

The distroless image keeps you on Temurin builds, so it is the smallest change for a team already on eclipse-temurin, as long as nothing in your image needs a shell. On 19 November, before the Temurin rebuild, we moved the demo app to Corretto by changing its FROM line to amazoncorretto:21, and it reported the same runtime=21.0.13.1+2-LTS and NOT REPRODUCED. Switching vendors changes the JDK your service was tested on, so run your test suite against the new base first. Now that the amd64 Temurin tag is fixed, a team already on Temurin should simply rebuild on it rather than switch.

Rolling it out in Kubernetes is an image change. Once a fixed image exists, take the stopgap variable off in the same change, because the flag costs Base64 throughput and nobody remembers to remove it later. We moved the orders deployment off Temurin and dropped the variable:

kubectl -n shop set image deployment/orders orders-eclipse-temurin-21-jre=orders-amazoncorretto-21:1.0
kubectl -n shop set env deployment/orders JAVA_TOOL_OPTIONS-
kubectl -n shop rollout status deployment/orders
kubectl -n shop logs deploy/orders

After the rollout, the new pod reported the fixed build, and the missing Picked up JAVA_TOOL_OPTIONS line shows the stopgap is gone.

up on 21.0.13.1+2-LTS

That was the 19 November move to Corretto. With the amd64 Temurin tag fixed, the same pattern works on Temurin: rebuild your app image with --pull --no-cache, push it under a new tag, and point the deployment at it. On an arm64 node pool, point it at an image built on a tag that is fixed for arm64. On the arm64 kind cluster we switched the stock api deployment to the Alpine tag and read the JVM again.

kubectl set image deployment/api eclipse-temurin=eclipse-temurin:21-jre-alpine
kubectl rollout status deployment/api
kubectl exec deploy/api -- java -version

The rollout finished and the replacement pod reported the fixed build. We dropped the two waiting lines of the rollout and kept only the runtime line of java -version.

deployment.apps/api image updated
deployment "api" successfully rolled out
OpenJDK Runtime Environment Temurin-21.0.13.1+2 (build 21.0.13.1+2-LTS)

The container name in set image is the one kubectl create deployment derived from the image name, so check yours with kubectl get deploy api -o jsonpath='{.spec.template.spec.containers[*].name}' before you run it.

arm64 rebuild on eclipse-temurin 21-jre staying on the old JDK, the Alpine rebuild picking up 21.0.13.1 and a kubectl set image rollout

That is the whole arm64 path in one session. The rebuild on the Ubuntu tag stays on 21.0.13+9 despite --pull --no-cache, the Alpine build argument gets 21.0.13.1+2, and the rollout carries it into the cluster.

5. Patch Red Hat UBI images with microdnf

Red Hat rebuilt the UBI OpenJDK runtime images on 19 November. When we pulled the ubi9 17 and 21 runtimes and the ubi10 21 runtime on 20 November, all three carried the fixed 17.0.21.1 or 21.0.13.1 build. For most teams docker build --pull is now enough. The layer below is still worth knowing for an image pinned to an older digest, or one built on top of UBI that you cannot re-pull right away. The UBI images install Java as an RPM, unlike Temurin. Red Hat shipped fixed packages in RHSA-2026:100567 (java-21, RHEL 8 and 9), RHSA-2026:100564 (java-17, RHEL 9) and RHSA-2026:100568 (java-21, RHEL 10), and the UBI repositories already carry them, so a two-line layer patches the image without waiting for Red Hat to rebuild it:

FROM registry.access.redhat.com/ubi9/openjdk-21-runtime
USER 0
RUN microdnf -y upgrade java-21-openjdk-headless && microdnf clean all
USER 185

Because the image runs as user 185, the layer switches to root for the upgrade and back again afterwards. Leave out the last line and your app ships running as root, which is a worse problem than the one you are fixing. Build it and check the runtime:

docker build --pull -t ubi-java21-fixed .
docker run --rm ubi-java21-fixed java -version

microdnf replaced the October package with the fixed one from ubi-9-appstream-rpms, and the runtime reports the Red Hat build of 21.0.13.1.

 java-21-openjdk-headless-1:21.0.13.1.2-1.2.el9.x86_64             ubi-9-appstream-rpms 51.8 MB
   replacing java-21-openjdk-headless-1:21.0.13.0.9-1.2.el9.x86_64
openjdk version "21.0.13.1" 2026-11-17 LTS
OpenJDK Runtime Environment (Red_Hat-21.0.13.1.2-1) (build 21.0.13.1+2-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.13.1.2-1) (build 21.0.13.1+2-LTS, mixed mode, sharing)

We ran this on the ubi9 openjdk-21 image. For the openjdk-17 images the package is java-17-openjdk-headless, and the ubi10 image takes the RHEL 10 build from RHSA-2026:100568; we did not run those two, so check java -version in the result. The same move works on any image built from a distro that already shipped the fix, such as an Ubuntu or Alpine 3.24 base with the JDK installed from the distro packages, and our Ubuntu Java4Shell patch guide and Alpine Java4Shell guide list the fixed package versions for those bases.

6. Rebuild Spring Boot images with the current Paketo builder

The Spring Boot build-image goal and the pack CLI build with Paketo buildpacks, which download a BellSoft Liberica JRE at build time instead of inheriting one from a base image. Paketo released Java buildpack 22.9.1 on 18 November with the fixed Liberica, so a rebuild against the current builder is the whole fix. We built the Paketo Maven sample app with the tiny Noble builder.

pack build demo-spring --builder paketobuildpacks/builder-noble-java-tiny --env BP_JVM_VERSION=21 --pull-policy always

Do not drop --pull-policy always, because a builder cached on your CI runner from last week still carries the vulnerable Liberica. The build log names the Liberica buildpack but shows only three version fields for the JRE:

[builder] Paketo Buildpack for BellSoft Liberica 11.10.6
[builder]   BellSoft Liberica JDK 21.0.13: Contributing to layer
[builder]   BellSoft Liberica JRE 21.0.13: Contributing to layer
Successfully built image 'demo-spring'

Is that the fixed Liberica or the October one? Three fields cannot tell you, so check the JRE in the image. The run image of the tiny builder has no shell, which broke the Paketo launcher when we tried to wrap the command, so we called the JRE binary directly.

docker run --rm --entrypoint /layers/paketo-buildpacks_bellsoft-liberica/jre/bin/java demo-spring -version

The JRE is the fixed 21.0.13.1 build, and the startup log of the app said the same, Starting DemoApplication v0.0.1-SNAPSHOT using Java 21.0.13.1, which is the line to grep for in your pod logs after the rollout:

openjdk version "21.0.13.1" 2026-11-17 LTS
OpenJDK Runtime Environment (build 21.0.13.1+5-LTS)
OpenJDK 64-Bit Server VM (build 21.0.13.1+5-LTS, mixed mode, sharing)

Spring Boot apps packaged the classic way, a fat jar copied into a Dockerfile, follow the base image of that Dockerfile instead, so go back to step 4 for those.

7. Set the stopgap where no fixed image exists

The list shrank a lot between our two checks. On 19 November it covered every eclipse-temurin tag plus Tomcat, Maven, Gradle and the Liberica runtime image. On 20 November these still had no fixed build where it matters.

  • maven:3-eclipse-temurin-21, last rebuilt before the Temurin update, with the trigger reproducing on amd64
  • Any image of your own, or from a vendor, built FROM eclipse-temurin before 20 November and not rebuilt since
  • Old Temurin builds pinned by digest, which --pull never replaces

The arm64 builds of the Ubuntu-based Temurin 17 and 21 tags, tomcat:10-jre21 and gradle:jdk21 are still on the old JDK as well, but no arm64 CPU can reach the bug, so they need a rebuild later rather than a stopgap now. Temurin installs a tarball under /opt/java/openjdk, so the microdnf upgrade from step 5 cannot patch its UBI-minimal variants either.

Calif Java4Shell trigger on an AVX-512 VBMI host: NOT REPRODUCED on Temurin 21 and 25, REPRODUCED on maven 3-eclipse-temurin-21

Why Maven tops that list: on the AVX-512 VBMI host the Calif trigger still changed 62 bytes of the target array (offsets 50 to 111) in maven:3-eclipse-temurin-21, while the freshly rebuilt Temurin 21 and 25 images rejected the input cleanly.

For the images in the list above, the interim mitigation from the Red Hat RHSB-2026-018 bulletin is to turn the Base64 intrinsic off. Every HotSpot JVM reads JAVA_TOOL_OPTIONS at start unless its launcher strips it, so one environment line covers most services without touching their entrypoint. Elasticsearch and OpenSearch are the exception: their launchers print warning: ignoring JAVA_TOOL_OPTIONS and keep the intrinsic on, so set ES_JAVA_OPTS or OPENSEARCH_JAVA_OPTS there, as our Elasticsearch and OpenSearch Java4Shell guide shows:

FROM eclipse-temurin:21-jre
ENV JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"
COPY Base64Trigger.class /app/
WORKDIR /app
CMD ["java", "Base64Trigger"]

We built that on 19 November, on the Temurin base that was still vulnerable then, and ran it. The JVM announced the option, and the trigger that reproduced on the same base in step 2 found nothing to corrupt.

Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics
runtime=21.0.13+9-LTS
vm=OpenJDK 64-Bit Server VM
rejected=true changed=0 first=-1 last=-1
NOT REPRODUCED

In Kubernetes, you can set the same variable on running workloads without a rebuild. kubectl set env edits the pod template, which starts a rolling restart, so every replica comes back with the flag:

kubectl -n shop set env deployment/orders deployment/web JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics
kubectl -n shop rollout status deployment/web
kubectl -n shop logs deploy/web | head -3

Look for the first line of the Tomcat log, which proves the running JVM took the flag. If the log of a pod lacks that line after the rollout, the variable never reached the JVM.

Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics
19-Nov-2026 09:06:37.977 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/10.1.62
19-Nov-2026 09:06:37.981 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 10 2026 14:07:24 UTC

For GitOps setups, put the variable in the manifest or Helm values instead, or the next sync can revert it. Calif also lists -XX:UseAVX=2 as an alternative, but a JVM on arm64 does not recognise that flag and refuses to start, so keep it out of multi-arch images and mixed node pools. A stopgap is easy to forget once the fixed images arrive, so this jq query lists every Deployment, StatefulSet and DaemonSet that still sets it inline (CronJobs, init containers and values from a ConfigMap need their own check):

kubectl get deploy,statefulset,daemonset -A -o json | jq -r '
  .items[] | . as $w | .spec.template.spec.containers[]
  | select(any(.env[]?; .name == "JAVA_TOOL_OPTIONS" and (.value // "" | test("UseBASE64Intrinsics"))))
  | "\($w.metadata.namespace)/\($w.kind)/\($w.metadata.name)  \(.image)"'

After we moved orders to Corretto in step 4, only the Tomcat deployment still had the flag on 19 November.

shop/Deployment/web  tomcat:10-jre21

That one can come off now on amd64 nodes, because tomcat:10-jre21 pulled 21.0.13.1+2 there on 20 November. A plain restart is not enough: with the default imagePullPolicy: IfNotPresent for a non-latest tag, a node reuses the copy it already cached. Point the deployment at the new index digest, or set the policy to Always before the restart, confirm the build with kubectl exec as in step 2, and only then run kubectl -n shop set env deployment/web JAVA_TOOL_OPTIONS-.

What broke: the stopgap that wiped Bitnami’s FIPS settings

Before we knew which images were fixed, our plan was to put the flag on every Java container with docker run -e and sort out the details later. We checked which images already set Java option variables of their own, and bitnami/java does. It uses JAVA_TOOL_OPTIONS to load its FIPS crypto module and a restricted security policy. Setting the variable from outside replaces that value instead of adding to it:

docker run --rm -e JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics bitnami/java:latest java -XshowSettings:properties -version 2>&1 | grep -E "Picked up|java.security.properties"

The JVM picked up only our flag, and the java.security.properties setting vanished from its properties, so the container would have started without the security policy Bitnami ships:

Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics

Bitnami had already fixed its image, so it never needed the flag, but the same thing happens on any image or Helm chart that sets this variable for an agent or a crypto provider. Before you set it, check with docker image inspect or the pod spec, and append instead of replacing. In a Dockerfile, reference the existing value:

FROM bitnami/java:latest
ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:-UseBASE64Intrinsics"

With the appended value, the JVM picked up all three options and the security policy came back:

Picked up JAVA_TOOL_OPTIONS: --module-path=/opt/bitnami/bc-fips/ -Djava.security.properties==/opt/bitnami/java/conf/security/java.security.restricted -XX:-UseBASE64Intrinsics
    java.security.properties = =/opt/bitnami/java/conf/security/java.security.restricted

In Kubernetes the same rule applies: a kubectl set env on a workload whose image sets the variable must repeat the value the image sets as well as the flag. Our Amazon Linux Java4Shell patch guide covers the host side, where a systemd drop-in carries the flag. For containers, rebuild what you can on a fixed base today and patch UBI images with microdnf. Rebuild Paketo images with a freshly pulled builder, and keep the flag, appended rather than replaced, on anything built FROM eclipse-temurin before 20 November that you have not rebuilt yet, such as maven:3-eclipse-temurin-21.

Keep reading

Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Security Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch Security nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch GL.iNet Security Notice: Check Your Router for Malware and Update Networking GL.iNet Security Notice: Check Your Router for Malware and Update Install LocalAI on Linux: Docker, Binary and GPU Setup AI Install LocalAI on Linux: Docker, Binary and GPU Setup Installing pfSense Firewall on Proxmox Hetzner root server Networking Installing pfSense Firewall on Proxmox Hetzner root server

Leave a Comment

Press ESC to close