Java4Shell: who the Java vulnerability concerns, and what to do
I got an email from DigitalOcean about a critical vulnerability in Java. It concerns you only when three things are true at once, the Java version, the server's processor and the application. How to check with one command, and what to set before you update.
On Friday, 20 November, I got an email from DigitalOcean, a company that rents out servers, about a vulnerability in Java, named Java4Shell. The email does not report a break-in. It says that through this vulnerability a stranger can run their own code on the server, without logging in.
The same day an email came about nginx, and a day later one about PHP. After these three emails I checked every project I look after.
Is it urgent
Only if three things are true at once.
- The version. OpenJDK 17.0.6 or newer, and also lines 21, 25 and 27.
- The server’s processor. The email lists Intel Xeon from the Ice Lake family on and AMD from Zen 4 on. Machines with ARM processors are not vulnerable.
- The application. That Java runs a program a stranger can send data to. Calif, the company that found the vulnerability, says it got code execution without logging in on default configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate.
Up to 18 November GreyNoise had seen attack attempts, but nobody had confirmed a successful one. On 22 November the vulnerability was not in the CISA catalogue, where the US agency lists vulnerabilities used in real attacks.
How to check
You check the processor on the server with the command from the email:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
Tenable adds what the email does not say: the condition is met only when the command prints all four names. On my computer, with a Ryzen 7 5700G, it prints one, bmi2.
java -version prints the Java version.
Remember the Java you did not install yourself. The email lists Jira, Jenkins and Keycloak among others.
What to do
- Update Java to 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1 and start the application again.
- If you cannot update right away, start Java with the
-XX:-UseBASE64Intrinsicsflag. - If your Java comes from a system package or from a vendor other than Oracle, check that vendor’s advisory. The email points to Oracle for the patch, and other vendors ship it on their own schedule.
The email also gives a second flag, -XX:UseAVX=2. On an ARM processor Java will not start with that flag at all.
Sophos notes that neither Oracle nor the OpenJDK project has published any workaround. Both flags come from the researchers at Calif.
For the curious: what is underneath
Where the bug is. Java4Shell, CVE-2026-114938, is a bug in the Base64 decoder in OpenJDK. Base64 is a way of writing any data in plain characters. Applications decode it often, for example when they read a header with a login and password.
Why the processor matters. The bug sits in the accelerated version of the decoder, which Java uses only on processors with the AVX-512 VBMI extension. The -XX:-UseBASE64Intrinsics flag turns that accelerated decoder off. The -XX:UseAVX=2 flag turns off all of AVX-512.
How little it takes. According to Calif’s description, which Help Net Security quotes, a string of 64 letters A ending with an equals sign is enough to corrupt memory.
How hard the attack is. Crashing a vulnerable Java is easy. VulnCheck, quoted in the same article, writes that repeated requests can keep a service down. Running your own code takes more: a separate memory leak and an exploit prepared for a specific application. Calif said it built the first working exploit in two hours, with the help of AI.
Caveats. As of 23 November 2026. I write from the DigitalOcean email and from public write-ups; I did not reproduce this vulnerability. Statements about attacks carry the dates given in the text and may have changed since.
Not sure which Java your services run on? Write to me.
I got an email from DigitalOcean about two critical vulnerabilities in nginx. They concern you if your nginx has HTTP/2 enabled and is older than 1.30.7 or 1.31.9. How to check with two commands, and what to do if you cannot update right away.
I got an email from DigitalOcean about vulnerabilities in PHP fixed by the releases of 19 November. Every older PHP needs the update, and in three setups the email tells you to check the server first. Which setups those are, how to recognise them, and what to set if you cannot update right away.