Mitigating Java4Shell in Nzyme
This afternoon, Calif disclosed a critical vulnerability in OpenJDK’s Base64 decoder, called Java4Shell (CVE-2026-114938). We determined that Nzyme is affected and are providing a simple mitigation until updated JVM packages are available.
Since version 2.0.0-alpha.18, Nzyme ships with its own Java runtime, so operating system updates will not fix this issue.
Older releases use the Java runtime of the operating system, which is affected if it is OpenJDK 17.0.6 or newer. The mitigation below works for those releases as well, but the fixed Java runtime will come from your operating system updates and not from a new Nzyme release.
Only x86-64 systems with a CPU that supports AVX-512 VBMI are affected. That includes Intel Xeon CPUs starting with Ice Lake and AMD CPUs starting with Zen 4. ARM systems, such as a Raspberry Pi, are not affected. The mitigation is safe to apply on any system, and we recommend applying it if you are not sure.
The underlying issue is in OpenJDK’s optimized Base64 decoder code, which can be disabled with
the -XX:-UseBASE64Intrinsics parameter.
In standard Nzyme setups, you can simply add it to the end of the NZYME_JAVA_OPTS arguments in
/etc/default/nzyme, like so:
$ cat /etc/default/nzyme
NZYME_JAVA_OPTS="-Xms6g -Xmx6g -XX:-OmitStackTraceInFastThrow -XX:-UseBASE64Intrinsics"
Make sure not to change any existing arguments in the file, because they may have been customized.
Restart Nzyme for the change to take effect.
We will cut a new Nzyme release tomorrow that sets this parameter by default. Until then, please apply the mitigation manually as described above.
We are awaiting fixed Eclipse Temurin builds and will issue another Nzyme release with the fixed Java runtime once they are available.