Trusted Foundation

Docker patches Java4Shell and the NGINX HTTP/2 with Docker Hardened Images

Posted Nov 19, 2026

OpenJDK and Oracle disclosed Java4Shell (CVE-2026-114938) on November 17, and NGINX released fixes for two HTTP/2 flaws the next day. Docker began publishing fixed images for both in the Docker Hardened Images (DHI) catalog starting that same day. 

What we know about Java4Shell is that it’s a memory-corruption bug in the Java runtime that can let an attacker with no credentials run code inside a Java application. Many container images contain a Java runtime, including application images that bundle their own, so it affects teams well beyond the ones that write Java.

Docker Hardened Images are the trusted foundation your applications should run on, because a flaw in the runtime inside an image is fixed only when that image is rebuilt, and Docker rebuilds its hardened images as soon as upstream fixes become available. Fixed images for the Amazon Corretto, SapMachine and Azul Zulu runtimes and for NGINX are in the catalog today, with Eclipse Temurin following as soon as Adoptium completes its fixed builds.

TL;DR

  • Affected: Java 17.0.6 and later, including Java 21, 25, 26 and 27, from every OpenJDK vendor.
  • Only on some hardware: the bug is reachable only when the JVM runs on an x86-64 CPU with AVX-512 VBMI. The same image can be exposed on one host and not on another.
  • Fixes are arriving vendor by vendor. Corretto, SapMachine and Zulu builds in DHI are fixed. Temurin, which many DHI application images use, is not released yet.
  • Check the version the runtime reports. A tag or a recent rebuild date does not tell you which Java build is inside an image. java -version does.
  • Until your image runs a fixed build, start Java with -XX:-UseBASE64Intrinsics. Set it yourself and check that it took effect. Make sure it reaches every JVM, not only the first one. The second half of this post shows how.
  • The NGINX HTTP/2 flaws are fixed in the catalog. The Docker Hardened Images for NGINX are rebuilt on NGINX 1.30.7 and 1.31.9. Pull the image again, or move a pinned tag to one of those versions, and redeploy.

What the vulnerability is

To decode Base64 quickly, the HotSpot JVM uses a hand-written routine built on AVX-512 instructions. That routine miscalculates a length when the input ends in unexpected padding and writes up to 62 bytes past the end of a buffer on the Java heap. Calif, the researchers who found it, turned that into heap disclosure and remote code execution.

They demonstrated code execution before authentication against default installations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate, and after authentication against Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. They note there is no universal exploit: each application needs its own, and they have not published those. As of November 18 there are no public reports of exploitation in the wild.

Oracle rates the issue 8.1 (High) under CVSS 3.1. The researchers rate it 9.2 (Critical) under CVSS 4.0. CISA has issued an alert urging immediate patching.

How to find out if you’re exposed

  • Java version. The JVM is 17.0.6 or later and does not yet include the fix. The fixed OpenJDK versions are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Vendors add their own suffixes, but in the builds we checked, the build string printed by java -version contains one of those four numbers when the runtime is fixed.
  • CPU. The host is x86-64 and supports AVX-512 VBMI: Intel Xeon from Ice Lake onward, AMD EPYC and Ryzen from Zen 4 onward. ARM64 hosts are not affected.
  • Reachability. Data an attacker controls reaches Java’s Base64 decoder. That includes Authorization headers, tokens, SAML messages and file uploads. A Java client that opens a TLS connection to a malicious server is also in scope. For anything that accepts network input, assume this is true.

All three of these must be true

To check a host’s CPU, run this on the host or Kubernetes node. Hardened runtime images have no shell, so it will not run inside the container.

grep -m1 ‘^flags’ /proc/cpuinfo | tr ‘ ‘ ‘\n’ | grep -E ‘^(avx512f|avx512bw|avx512vbmi|bmi2)$’

The host is affected if all four flags are printed.

Two other ways to check, for when a shell on the node is hard to get.

Ask the JVM. This works in hardened images:

docker run –rm –entrypoint java <image> -XX:+PrintFlagsFinal -version | grep -w UseAVX

UseAVX = 3 means the JVM is using AVX-512 on that host. Treat the host as affected until the full check says otherwise. A value of 0 to 2 means AVX-512 is not in use. On ARM64 nothing is printed. The answer applies only to the host the command ran on.

Ask Kubernetes. kubectl get nodes -L kubernetes.io/arch,node.kubernetes.io/instance-type shows the architecture and instance type of every node. If you run Node Feature Discovery, nodes with the instruction set carry the label feature.node.kubernetes.io/cpu-cpuid.AVX512VBMI=true.

Check build runners and CI workers as well. They run Java, and they talk to the network.

Ask the JVM. This works in hardened images:

docker run –rm –entrypoint java <image> -XX:+PrintFlagsFinal -version | grep -w UseAVX

UseAVX = 3 means the JVM is using AVX-512 on that host. Treat the host as affected until the full check says otherwise. A value of 0 to 2 means AVX-512 is not in use. On ARM64 nothing is printed. The answer applies only to the host the command ran on.

Ask Kubernetes. kubectl get nodes -L kubernetes.io/arch,node.kubernetes.io/instance-type shows the architecture and instance type of every node. If you run Node Feature Discovery, nodes with the instruction set carry the label feature.node.kubernetes.io/cpu-cpuid.AVX512VBMI=true.

Check build runners and CI workers as well. They run Java, and they talk to the network.

Where Docker Hardened Images stand

Java runtime in DHI

DHI status

Amazon Corretto 17, 21, 25, 27

Fixed. The published images report 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2 and 27.0.1.1.4.

SapMachine 21, 25, 27

Fixed. The published images report 21.0.13.1+2, 25.0.5.1+2 and 27.0.1.1+4.

Azul Zulu 17, 21, 25, 27

Fixed. The published Zulu images we checked report 17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2 and 27.0.1.1+4.

Eclipse Temurin 17, 21, 25, 27

Waiting for Adoptium to complete its release. On November 18 Adoptium had published 27.0.1.1+4 for x86-64 Linux only. 17.0.21.1, 21.0.13.1 and 25.0.5.1 were still in testing. Adoptium tracks progress in adoptium/temurin#326. Our published images still report 17.0.21+9, 21.0.13+9, 25.0.5+8 and 27.0.1.0.2+1, which are vulnerable.

Java 26 (any vendor)

Java 26 reached end of support in September 2026, so no fix is expected from any vendor, and it is not among the fixed lines in the OpenJDK advisory. If you run it, treat it as affected and keep the flag set. We recommend moving to Java 25 or updating to Java 27. If you cannot migrate yet, ask us whether Extended Lifecycle Support can cover your version. It is the Docker Hardened Images Enterprise add-on for software past its upstream end of life.

Java 8 and 11

Not affected by this CVE and no action is needed for it. The same November update fixes other issues in these lines, so update when new images arrive.

Application images that bundle Java, such as Keycloak, Jenkins, Kafka, Elasticsearch and Solr

They follow the bundled runtime, which for many of them is Temurin, and they are rebuilt once the runtime they use is fixed. Until then, set the flag yourself.

Set the mitigation flag yourself on every JVM that is still waiting for a fixed runtime, and check what each image already sets before you do. Treat the flag as a stopgap, because a JVM is protected only if the flag reaches it when it starts, and a deployment setting or a start script can override it or drop it. A fixed runtime is the only thing that closes the issue, so move to the fixed image as soon as it is published.

Next Steps:

If you are not running Docker Hardened Images yet

The CPU check and the mitigation flag in the steps below apply to any image that runs a HotSpot-based OpenJDK build. The version strings in this post come from Docker Hardened Images, so for an image from another source, confirm the fixed build in that source’s advisory.

The fixed build can only come from whoever builds your image, because the Java runtime and the system packages your application runs on come from the image underneath it. That dependency is why a hardened image is a necessary step toward a trusted software supply chain. With Docker Hardened Images, tracking each vendor’s fix and rebuilding on it is work Docker does for you. The images are minimal and secure by default, and they are built to serve as a trusted and verifiable upstream for your builds. You can move a service onto one by following the migration guide.

If you have Docker Hardened Images deployed

  1. 1. Find the Java in your deployments, by version. Look for DHI Java runtime images, DHI application images that bundle Java, and your own images built on either. Include JVMs you add in your own layers. Ask each runtime for its version. This works on hardened images, which have no shell:

    docker run –rm –entrypoint java <image> -version

    Compare the result with the fixed versions above. Temurin-21.0.13+9 is vulnerable. Corretto-21.0.13.1.2 is fixed.

    Do not rely on a vulnerability scan alone for this. The public vulnerability databases were still incomplete for this CVE on November 18.
  2. Set the flag. For most deployments, set JAVA_TOOL_OPTIONS on the container:

    docker run -e JAVA_TOOL_OPTIONS=”-XX:-UseBASE64Intrinsics” <your-image>

    env:
      – name: JAVA_TOOL_OPTIONS
        value: “-XX:-UseBASE64Intrinsics”

    Three cases need more care, and the next section covers them: images that already set Java option variables (our FIPS images do), environments that also run Java 8, and anything that starts more than one JVM.

    Prefer this flag to -XX:UseAVX=2, the other published mitigation. UseAVX does not exist on ARM64, and a JVM given it there will not start. Applications that decode very large volumes of Base64 may run slower with the flag. Test before a wide rollout.

    The flag addresses this CVE only. The same OpenJDK release fixes nine other CVEs, including two rated 7.4 that affect every Java line from 8 to 27. Only the fixed image addresses those.
  3. Restart, then verify. The flag is read only at JVM startup. It cannot be changed in a running JVM, so every JVM has to be restarted. Then look for this line in the container log:

    Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics
  4. Check your CPUs, and keep checking. Run the CPU command on every node pool. A cluster with mixed instance types can schedule the same pod onto an affected node tomorrow. If any node in a pool is affected, treat the workload as affected.
  5. Reduce exposure. Restrict network access to Java services that do not need to be public, starting with identity, CI/CD and collaboration systems. The researchers note that a proxy which buffers whole request bodies gets in the way of some of their exploits but not all of them, so do not count on it.
  6. Watch for crashes, and think about secrets. A failed attempt can crash the JVM. In the container log a crash starts like this:

    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  SIGSEGV (0xb) at pc=0x…, pid=1, tid=…

    The JVM also writes a report named hs_err_pid<pid>.log inside the container. That file is gone when the container is replaced, which in Kubernetes happens straight away. To keep it, point -XX:ErrorFile at a mounted volume. The malformed input is also rejected with an IllegalArgumentException, so a burst of Base64 decoding errors in an application’s log is worth a look. Neither signal is reliable, and a service that stays up is not proof that nothing happened.

    The researchers could read the Java heap before they could run code. If you have reason to believe an exposed JVM on affected hardware was attacked, treat the keys, tokens and passwords it held as disclosed, and rotate them.

Making the flag reach every JVM

A container often runs more than one JVM, for example when a build tool forks a JVM for tests, an application server starts helper processes or a CI agent starts a JVM for every build step. The flag protects only the JVMs that receive it, and the variable most people reach for first is JAVA_OPTS, which Java does not read at all.

Where you put the flag

What reads it

Child JVMs get it?

Watch out for

JAVA_TOOL_OPTIONS

The JVM itself, however it is started. Includes javac, keytool and other JDK tools.

Yes, through the inherited environment

A Java 8 JVM that sees it refuses to start. Some DHI FIPS images already set this variable.

JDK_JAVA_OPTIONS

Only the java launcher, Java 9 and later

Yes, when the child is started with java

Not read by javac, keytool or other JDK tools. DHI FIPS images set it. Java 8 ignores it.

The java command line

That one JVM

No

Nothing downstream inherits it.

JAVA_OPTS, JENKINS_JAVA_OPTS, MAVEN_OPTS, ES_JAVA_OPTS and similar

A start script, which copies the value onto one java command line

No

Each script has its own rules. If nothing in the image reads the variable, it does nothing.

Five rules follow from that table. We tested each on DHI images.

JAVA_OPTS only works where a script reads it. With JAVA_OPTS=”-XX:-UseBASE64Intrinsics” set and a plain java command, the intrinsic stays on. No warning is printed.

A flag on the command line stops at that process. We started a JVM with the flag on its command line and had it start a second JVM. The child ran with the intrinsic on. With JAVA_TOOL_OPTIONS or JDK_JAVA_OPTIONS in the environment, the child ran with it off. A child started with a cleared environment gets nothing, whichever variable you use.

Check what the image already sets before you set anything. In Docker and Kubernetes, your value replaces the image’s value. It is not appended.

docker inspect –format ‘{{range .Config.Env}}{{println .}}{{end}}’ <image> \
  | grep -E ‘^(JAVA_TOOL_OPTIONS|JDK_JAVA_OPTIONS)=’

Our FIPS images use these variables to configure the FIPS provider. dhi.io/eclipse-temurin:21-fips sets both. When we replaced its JDK_JAVA_OPTIONS with only the flag, the JVM started normally, but the org.bouncycastle.fips.approved_only property was gone. Nothing warned us. If the command prints a value, copy it and add the flag at the end:

env:
  – name: JDK_JAVA_OPTIONS
    value: “<the existing value from the image> -XX:-UseBASE64Intrinsics”

Not every FIPS image uses the same variables, so run the check for each image.

Keep JAVA_TOOL_OPTIONS away from Java 8. Java 8 is not affected and does not know the flag:

Picked up JAVA_TOOL_OPTIONS: -XX:-UseBASE64Intrinsics
Unrecognized VM option ‘UseBASE64Intrinsics’
Error: Could not create the Java Virtual Machine.

Adding -XX:+IgnoreUnrecognizedVMOptions to the variable does not help on Java 8. Where Java 8 shares an environment with a newer Java, either scope the variable to the containers that need it or use JDK_JAVA_OPTIONS, which Java 8 ignores. Java 11 accepts the flag, so it is harmless there.

Verify the process, not the environment. Running java -XX:+PrintFlagsFinal -version inside a container starts a new JVM. It tells you what the environment gives a new JVM, not what the JVM already serving traffic was started with. For the running process, use the startup log line. JDK_JAVA_OPTIONS prints one too, starting with NOTE: Picked up. In an image that includes the JDK you can also ask the process directly:

jcmd <pid> VM.flags | tr ‘ ‘ ‘\n’ | grep UseBASE64Intrinsics

The answer must be -XX:-UseBASE64Intrinsics. If the flag reached the JVM through an environment variable, it will not show in the process’s command line, so ps is not a reliable check.

Some applications discard these variables on purpose. Elasticsearch’s start script, for example, ignores JAVA_TOOL_OPTIONS and expects ES_JAVA_OPTS. Check your application’s documentation.

When the fixed images arrive

Pull the new image and redeploy. Four things catch people out:

  • The tag may not change. dhi.io/amazoncorretto:21.0.13 now reports the fixed Corretto-21.0.13.1.2, a newer build than the tag name suggests. A tag cannot tell you which build you are running. java -version can.
  • Kubernetes may not pull. With imagePullPolicy: IfNotPresent, the default for every tag except latest, a node that already holds the old image under that tag keeps using it, even after a restart. Deploy by digest, or set the policy to Always for this rollout.
  • Mirrors lag. If you copy DHI into your own registry, the fix arrives when your mirror next syncs.
  • Your own images need a rebuild. An image built FROM a DHI Java image keeps the old runtime until you rebuild and redeploy it.

Then confirm with java -version that what is running reports a fixed build. After that, remove the flag from every place you set it.

The NGINX HTTP/2 flaws are fixed in the same catalog

The day after Java4Shell, NGINX released fixes for two memory errors in the way it handles HTTP/2 connections, tracked as CVE-2026-123007 and CVE-2026-123633. A crafted request can crash a worker process, and where an attacker gets past the operating system’s memory protections it can run code inside that worker. Both flaws need HTTP/2 to be enabled on the server, and the same releases fix other NGINX issues that do not depend on HTTP/2, so update either way.

The Docker Hardened Images for NGINX were rebuilt on NGINX 1.30.7 and 1.31.9 and published on November 18, the same day as the upstream release. To patch, pull the image again and redeploy, and move any tag pinned to an older exact version to a fixed one. nginx -v prints the version, and the fixed ones are 1.30.7 and 1.31.9. The notes on pull policy, mirrors and your own images in the section above apply to NGINX images in the same way.

Who does what

The vulnerable code is in the Java runtime inside the image, and if you are using DHI, shipping the fix becomes our job. Whether that code can be reached in your deployment depends on things an image cannot see: the CPU it is scheduled onto, the options you start it with, the processes it starts, and the traffic you send it.

With Docker Hardened Images, Docker will

Without Docker Hardened Images

Track every Java vendor and ship fixed runtimes in DHI as soon as they are released

Track every Java vendor yourself and rebuild your base images on each fixed runtime

Tell you which images are fixed and which are still waiting

Find out from each vendor which of its builds are fixed

Tell you what we know, and update this post

Follow the OpenJDK, Oracle and vendor advisories as they change

Three jobs stay with you whichever image you run.

  • Pull the fixed images, redeploy, and confirm the Java version that is actually running.
  • Make sure the flag is set on every JVM that is still waiting for a fixed runtime.
  • Know which CPUs your workloads run on, control what can reach your Java services, and patch the JVMs you add yourself.

So how many more bullets are you willing to dodge?

It was only four weeks ago that the news was PHP2Shell and the eMudhra certificate compromise. Calif, the security research team that found Java4Shell and helped find PHP2Shell, says it used AI to find this flaw in about an hour and that the whole effort cost less than $200 in tokens. When a flaw like this can be found and weaponized at that price, it is reasonable to expect more of them.

If you lead a team or answer for how your organization builds and ships software, the questions after a week like this one are whether you were exposed and how quickly you can prove you were not. It is imperative to have a trusted foundation in place before the next flaw appears, and Docker Hardened Images is that foundation to adopt. This week Docker began publishing fixed Java and NGINX images to the catalog within a day of each disclosure, with the images still waiting listed in the status table above. Each image ships with a signed SBOM and SLSA Build Level 3 provenance, so you have a record of what it contains and how it was built.

The Docker Hardened Images catalog is free and open source under Apache 2.0, and moving one of your services onto a hardened image typically means changing one line in its Dockerfile. If you are not building on Docker Hardened Images yet, start today.

About the Authors

Software Engineer II, Docker

Profile Picture of Vishrut Iyengar

Principal Product Marketing Manager, Docker