Java4Shell and ColdFusion

by Pete Freitag

Oracle has released security patches for Java today, with one of the vulnerabilities gaining a lot of attention, and being dubbed as "Java4Shell". This vulnerability CVE-2026-114938 affects Java 17 and above according to the openjdk advisory. This means that if you are running Java 8, or Java 11 on your ColdFusion or Lucee server then you should not be impacted by this particular vulnerability, however there were other vulnerabilities patched in this update, so you should still apply it.

What is the vulnerability?

The vulnerability exists in Java's Base64 decoder implementation on systems. Java implements CPU optimizations on x86 systems that support the AVX-512 VBMI instruction set.

Are you vulnerable?

If you are running a JVM that hasn't been patched then you might be vulnerable, applying the latest Java Security Updates is highly recommended! But because the vulnerability requires the AVX-512 VBMI, you can also check and see if your server CPU supports it.

Checking to see if your server CPU supports AVX-512 with java

One of the easiest ways I've found to check is to run java -version with -XX:+PrintFlagsFinal

java -XX:+PrintFlagsFinal -version 

If you are on linux you can use grep to filter out the UseAVX, and UseBASE64Intrinsics flags, which are of importance to this vulnerability:

java -XX:+PrintFlagsFinal -version | grep -E 'UseAVX|UseBASE64Intrinsics'

On window you can use findstr to filter:

java -XX:+PrintFlagsFinal -version | findstr "UseAVX UseBASE64Intrinsics"

On a server that supports AVX-512 you would see a value of 3 for the UseAVX flag. If the value is 2, then AVX-512 is not enabled. Here's what I see on a server that doesn't support it:

int UseAVX                                   = 2                                    {ARCH product} {default}
bool UseBASE64Intrinsics                      = true                                      {product} {default}
openjdk version "21.0.13.1" 2026-11-17 LTS
OpenJDK Runtime Environment Corretto-21.0.13.1.2 (build 21.0.13.1+2-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.13.1.2 (build 21.0.13.1+2-LTS, mixed mode, sharing)

You can see above that UseAVX = 2, and UseBASE64Intrinsics = true.

Checking if your CPU supports AVX-512 VBMI on linux

On linux you can run the following command to see if your CPU supports the AVX-512 instruction via /proc/cpuinfo:

grep -o 'avx512vbmi' /proc/cpuinfo

If it outputs avx512vbmi then it supports AVX-512 VBMI instruction set needed for the vulnerable code path.

Checking if your CPU supports AVX-512 VBMI on windows

On windows (or linux) you can java to list the cpu flags:

java -Xlog:os+cpu -version

You'll want to look for something like avx512_vbmi in the output.

Checking your JVM at runtime

You can check your CFML engine at runtime with the following code:

function getVMOption(required string name) {
    var mbs = createObject("java", "java.lang.management.ManagementFactory").getPlatformMBeanServer();
    var bean = createObject("java", "javax.management.ObjectName").init("com.sun.management:type=HotSpotDiagnostic");
    var opt = mbs.invoke(bean, "getVMOption", [ arguments.name ], javaCast("string[]", [ "java.lang.String" ]));
    return opt.get("value");
}
writeOutput("UseBASE64Intrinsics: " & getVMOption("UseBASE64Intrinsics") & "<br>");
writeOutput("UseAVX: " & getVMOption("UseAVX"));

Mitigations

Again, updating the JVM to the latest version is your best course of action, these mitigations have not been published by Oracle or OpenJDK, so use at your own risk, and conduct testing before applying them.

Set UseBASE64Intrinsics to false

Set a JVM argument to disable UseBASE64Intrinsics

-XX:-UseBASE64Intrinsics

The - in front of UseBASE64Intrinsics tells the jvm to set the value to false, without it, it would set to true (the default).

Set UseAVX

If UseAVX is set to 3, you can set the JVM argument to 2. This might impact other CPU optimizations that the JVM performs, besides the Base64 optimization.

-XX:UseAVX=2

Checking JVM flags at runtime

You can check the value of a JVM flag at runtime by passing the process id of a running jvm process to jinfo, a tool located in Java's bin directory.

jinfo -flag UseBASE64Intrinsics 12345

It will output the flag that the running JVM is using. If you are using a JVM flag mitigation, I would suggest double checking that you have set it properly with this method.

The Fixinator Code Security Scanner for ColdFusion & CFML is an easy to use security tool that every CF developer can use. It can also easily integrate into CI for automatic scanning on every commit.