News 4 min read

Java4Shell: critical OpenJDK flaw, patch Java 17 to 27 now


Security firm Calif has disclosed Java4Shell (CVE-2026-114938), a critical vulnerability in OpenJDK’s hardware-accelerated Base64 decoder that can let a remote attacker read server memory and, in some applications, run code. OpenJDK published a vulnerability advisory and Oracle a Critical Security Patch Update with fixes on November 17, 2026. If you run Java 17 or newer on modern Intel or AMD servers, update your JDK today: Base64 decoding sits behind logins, tokens and file uploads in almost every Java service.

What’s new

  • What the bug is. On x86-64 processors with AVX-512 VBMI, the HotSpot JIT compiler swaps the standard java.util.Base64 decoder for an optimized machine-code routine. Calif found that this routine mishandles some malformed input and writes past the end of its output buffer, corrupting nearby memory on the Java heap. Calif says that corruption can leak heap contents (keys, tokens, personal data) and lead to remote code execution.
  • How severe. OpenJDK scores it 8.1 under CVSS 3.1 (network attack, high complexity, no privileges or user interaction needed). Calif rates it 9.2, critical, under CVSS 4.0.
  • Which Java versions. The OpenJDK advisory lists Java 17, 21, 25 and 27 as affected; Java 8 and 11 are not marked for this CVE. Calif says the problem exists from OpenJDK 17.0.6 onwards. Oracle lists Oracle Java SE 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3 and 27.0.1.0.3 (plus 8u511b33-perf), Oracle GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3, and GraalVM Enterprise Edition 21.3.20.0.3 among the affected supported versions.
  • Which distributions. Because they are built from OpenJDK, Calif names Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle OpenJDK, Oracle Java SE and Oracle GraalVM for JDK as vulnerable until they ship the fix.
  • Which hardware. Only x86-64 CPUs with AVX-512 VBMI are affected: Calif lists Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, and AMD EPYC and Ryzen from Zen 4 onwards. ARM64 machines, such as AWS Graviton or Apple Silicon, are not affected.
  • Which apps. Calif says it demonstrated remote code execution without logging in against default configurations of Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate, and after logging in against Apache Kafka, Apache Solr, Elasticsearch, Gerrit and Spinnaker. It also showed it in sample Spring Boot and Apache Struts apps, and says a Java client that connects over TLS to a malicious server can be attacked too. Calif is holding back its product-specific exploits until people have had time to upgrade.

What it means for developers

Update the JDK first. Install the November 17 update from whichever vendor you use, then restart every JVM: containers, app servers, build agents and CI runners, not only the obvious web services. A rebuilt image with a new base JDK is not patched until the old containers are replaced. Self-hosted tools such as Jenkins, Jira, Confluence, Keycloak and Artifactory run on the JDK you give them, so check the Java version under each one.

Check whether your servers have the CPU feature. Calif gives this command for Linux; the bug needs all four flags in the output:

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

Cloud instance types follow the CPU generation, so a fleet can be a mix of affected and unaffected hosts.

If you can’t patch today, Calif lists two JVM options that turn off the vulnerable code path:

  • -XX:-UseBASE64Intrinsics disables the hardware-accelerated Base64 routines.
  • -XX:UseAVX=2 disables AVX-512. Use it only on x86-64 hosts: Calif warns that OpenJDK on ARM doesn’t recognize it and won’t start.

You can pass either through JAVA_TOOL_OPTIONS or your app server’s JVM arguments. Both cost some speed on Base64-heavy or vector-heavy workloads, and neither replaces the update. Calif also notes that a reverse proxy buffering request bodies, as nginx does by default, gets in the way of some attack paths but is not a general fix.

The same November 17 OpenJDK advisory fixes nine other CVEs, two of them rated 7.4 in the TLS and Kerberos (JGSS) libraries, so the update is worth taking even on ARM or older CPUs.

How it compares

The name points back to Log4Shell, the 2021 Log4j bug, but the two are different. Log4Shell was a logic flaw in a library you could upgrade on its own and worked on any hardware. Java4Shell is in the Java runtime itself, needs specific x86-64 CPUs, and Calif says there is no universal exploit: each application needs its own attack chain. That makes mass exploitation slower, but the fix has to reach every JVM rather than one dependency.

Calif says it found the bug with AI help, the same approach behind its earlier PHP2Shell disclosure: one researcher took about an hour to find it and two more to build a first exploit, for under $200 in model costs. It follows a run of AI-assisted security news, from the FBI’s warning about the ARTEX AI hacking tool to last week’s Git 2.56.1 security fixes.

Sources