Java4Shell: Critical OpenJDK Flaw Allows Unauthenticated Remote Code Execution

A heap overflow vulnerability in the OpenJDK Base64 decoder, tracked as CVE-2026-114938, lets remote attackers run code on Java servers with AVX-512 processors. Patches are available.

Key findings

  • CVE-2026-114938, which has been dubbed Java4Shell, is a critical heap overflow in the Base64 decoder of the OpenJDK HotSpot Java Virtual Machine (JVM) on x86-64. It has a Common Vulnerability Scoring System (CVSS) v4.0 score of 9.2 (Critical), according to Calif, which discovered the flaw, and 8.1 (High) on CVSS 3.1 per OpenJDK's advisory.
  • A remote, unauthenticated attacker who can deliver crafted Base64 input to a vulnerable Java process can corrupt heap memory and achieve remote code execution (RCE). No user interaction is required for server-side attacks.
  • Only hosts with AVX-512 Vector Byte Manipulation Instructions (VBMI) are exposed. That means Intel Ice Lake or newer, or AMD Zen 4 or newer. ARM64 hosts, Java 11 and standard OpenJDK 8 are not affected.
  • Security company Calif demonstrated pre-authentication RCE in test configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate.
  • Oracle and OpenJDK released fixes on November 17, 2026. Fixed builds end in ".1", and the same version number without the suffix remains vulnerable.
  • No in-the-wild exploitation had been reported as of publication, but a proof-of-concept trigger is public. Symantec and Carbon Black Security Response is investigating, and up-to-date protection information will be added to our Protection Bulletin.

Overview

A critical vulnerability in OpenJDK, CVE-2026-114938 (aka Java4Shell), was disclosed on November 17, 2026. The flaw sits in the optimized Base64 decoder that the HotSpot JVM uses on x86-64 processors with AVX-512 VBMI support. Oracle and OpenJDK have released patches, and the U.S. Cybersecurity and Infrastructure Security Agency (CISA) urged immediate patching. At time of writing on November 18 there has been no evidence found of in-the-wild exploitation of this bug.

Java4Shell is significant because Base64 decoding is routine in server software. Authentication headers, JSON Web Tokens (JWT), Security Assertion Markup Language (SAML) assertions, file uploads and API fields are all Base64 encoded, so internet-facing login and API services decode attacker-controlled data by design. Calif, the security firm that first reported the flaw, published a standalone trigger and said product-specific exploit chains would be held back until upgrades are more widespread. Details about the flaw became public before patches were available.

How the vulnerability works

The store mask used by the decoder is wrong when the Base64 input ends in padding. As a result, the calculated output length underflows, and the decoder writes a full 64 bytes into a buffer that is smaller than that. According to Calif, a 65-byte input overflows the heap by 62 bytes, which corrupts adjacent Java objects, allowing an actor to gain heap read and write primitives, which makes the bug remotely exploitable.

Exploitation of the heap overflow depends on the layout of the target application, and a failed attempt can crash the JVM. A crash would result in denial of service, but Calif reported that retries often succeed. Heap memory disclosure is also possible. A client-side variant exists: a Java application that connects over Transport Layer Security (TLS) to a malicious server can be compromised.

Who is affected?

Affected versions are OpenJDK 17.0.6 and later (including 17.0.6 to 17.0.21), Java 21 before 21.0.13.1, Java 25 before 25.0.5.1 and Java 27. Oracle also lists Java SE 8 8u511b33-perf. Builds from Oracle, Corretto, Temurin, Microsoft, Zulu, Liberica, SapMachine, Red Hat and GraalVM are affected. Hosts must also run on an x86-64 processor with AVX-512 VBMI, which includes Intel Ice Lake and newer and AMD Zen 4 and newer. Java 11, standard OpenJDK 8, ARM64 hosts and x86 processors without AVX-512 VBMI are not affected.

Enterprise and server deployments carry the most risk, particularly identity, application lifecycle, build pipeline, artifact and data platforms. Popular Java-based applications such as Jira, Confluence, Jenkins, Keycloak, Kafka and Elasticsearch could be affected. Many of these products ship their own bundled Java runtime, so organizations should check each vendor for updated releases and should not rely on the host's Java version alone. Consumers are mainly exposed through Java client applications.

Exploitation status

No in-the-wild exploitation had been reported as of November 18, 2026. However, Calif published a trigger that reproduces the overflow. It also showed pre-authentication RCE in Jira, Confluence, Jenkins, Keycloak, JFrog Artifactory and PingFederate, as well as post-authentication RCE in Apache Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. Fake proof-of-concept repositories are likely to appear, and unpatched internet-facing Java services on AVX-512 hardware should be treated as potentially exposed.

Patching

Oracle released fixes in its November 2026 Critical Patch Update, alongside an OpenJDK advisory of the same date. Fixed builds are:

  • Java 17: 17.0.21.1
  • Java 21: 21.0.13.1
  • Java 25: 25.0.5.1
  • Java 27: 27.0.1.1
  • Java SE 8 (-perf builds): see the Oracle advisory

A running JVM keeps the vulnerable code until it is restarted, so every Java process must be restarted after upgrading. Containers should be rebuilt on patched base images. Downstream vendors are rolling out their own fixes, and fixed builds for several of them were not yet published at time of writing. CISA also advised identifying all Java installations, including those bundled in third-party applications, containers and appliances, and prioritizing internet-facing systems.

Interim mitigations

Where patching is not immediately possible, Calif lists two JVM options. Both require a restart and neither replaces patching.

  • Add -XX:-UseBASE64Intrinsics to disable the Base64 intrinsics. This may slow Base64-heavy workloads.
  • Add -XX:UseAVX=2 to disable AVX-512. Use this on x86-64 hosts only, because the JVM will not start with it on ARM.
  • Do not set -XX:DisableIntrinsic=_base64_decodeBlock on its own. It breaks JVM startup and can cause an outage if pushed fleet-wide.

CISA also recommended compensating controls such as validating Base64 input at the application boundary, enforcing input size limits and limiting unauthenticated access. Defenders can look for Base64 tokens that contain an equals sign and whose length is not a multiple of four, decoder exceptions such as “Input byte array has wrong 4-byte ending unit” in application logs, and unexpected JVM crashes or new hs_err_pid log files. The exception is thrown after the overflow, so it indicates an attempt and not a blocked attack.

Protection

Symantec and Carbon Black Security Response is investigating this vulnerability, guidance and reproduction steps. Full protection information is in the Symantec Protection Bulletin for Java4Shell. The bulletin will be updated continuously as new information becomes available.

Upcoming Events

See what's next

Threat Updates

Get the latest