Mitigating CVE-2026-114938 ("Java4Shell") in Apache Flink deployments
November 18, 2026 - Martijn VisserCVE-2026-114938, also known as “Java4Shell”, is a vulnerability in the JDK that can also affect Flink deployments. The bug is in the AVX-512 VBMI intrinsic that OpenJDK uses on x86-64 to speed up Base64 decoding, and OpenJDK has fixed it in JDK-8393212. Because the problem is in the JDK, Flink itself does not need a code change. What you need to upgrade is the JDK that Flink runs on. Until you can do that, there is a JVM flag that turns off the affected code.
Who is affected #
Your Flink processes are affected when they run on one of the Java versions below, on an x86-64 CPU with AVX-512 VBMI. Java 8 and Java 11 do not contain the affected code, and neither do ARM machines.
| Java | Affected | Fixed in |
|---|---|---|
| 17 | 17.0.6 up to and including 17.0.21 | 17.0.21.1 |
| 21 | 21 up to and including 21.0.13 | 21.0.13.1 |
| 25 | 25 up to and including 25.0.5 | 25.0.5.1 |
| 27 | 27 up to and including 27.0.1 | 27.0.1.1 |
| 18 to 20, 22 to 24, 26 | All releases | No fix, these versions no longer receive updates |
No released Flink version supports Java 25 or later yet. The rows for those versions are for anyone who runs Flink on them anyway.
Upgrading #
Upgrade to the version in the “Fixed in” column, or anything later, once your JDK vendor has released it. If you run a Java version that no longer receives updates, move to one that does.
Until you can upgrade #
In the meantime you can switch off the Base64 intrinsic with -XX:-UseBASE64Intrinsics.
Add it to env.java.opts.all in your Flink configuration file, so that it applies to every Flink process:
env.java.opts.all: -XX:-UseBASE64Intrinsics
If you already set env.java.opts.all, append the flag to the existing value.
On Docker you can pass the same line through the FLINK_PROPERTIES environment variable.
With the Flink Kubernetes Operator, put it under flinkConfiguration in your FlinkDeployment:
spec:
flinkConfiguration:
env.java.opts.all: -XX:-UseBASE64Intrinsics
The flag only exists on Java 11 and later. Java 8 does not recognise it and will not start, so do not add it to Java 8 setups.
You may also come across -XX:UseAVX=2 as a workaround. Java on ARM rejects that flag and will not start.
Docker images #
The official Flink images on Docker Hub (flink, also known as library/flink) are rebuilt automatically once the eclipse-temurin base images contain the fixed JDK.
That only happens for tags that are still maintained, so older patch releases such as 2.2.0 or 1.20.4 will stay on the old JDK.
The apache/flink images and the Flink Kubernetes Operator image are not rebuilt automatically.
If you use apache/flink, either set the flag as described above or switch to the official flink images.
For the operator pod itself, you can set the flag through the Helm values jvmArgs.operator and jvmArgs.webhook.
Once Temurin has published the fixed JDK builds, we plan to republish the apache/flink images and the Flink Kubernetes Operator image with the updated JDK, for the supported versions of Apache Flink and the Flink Kubernetes Operator.
We will update this post when that has happened.