Skip to content
Memory corruption Write-up Advanced

Java4Shell (CVE-2026‑114938): Critical Pre-Authentication RCE in Java 17, 21, 25 and 27

A heap out-of-bounds write exists in the AVX-512 optimised Base64 decoder of the OpenJDK HotSpot JVM. An unauthenticated attacker could corrupt Java heap memory, read secrets from it and potentially execute arbitrary code on vulnerable servers.

mhmmuneef Follow

Published on mhmmuneef.medium.com

Java

Mohammed Muneef, on mhmmuneef.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Java4Shell, tracked as CVE-2026‑114938, is a vulnerability in the OpenJDK HotSpot Java runtime itself rather than in a single application or third-party library. The flaw sits in an AVX-512 optimised Base64 decoding routine, and it allows an unauthenticated attacker to corrupt Java heap memory, read secrets from it and potentially execute arbitrary code on vulnerable servers.

The research firm Calif discovered and reported the flaw and demonstrated pre-authentication remote code execution against default installations of widely deployed enterprise applications, including Jenkins, Jira, Confluence, Keycloak, Artifactory and PingFederate. Base64 decoding is used everywhere, in authentication headers, API requests, tokens, certificates and encoded application data, but exposure depends on whether attacker-controlled data reaches the affected decoder. The vulnerable operation can run before an application finishes authenticating a user.

From the original on mhmmuneef.medium.com

Setup

Exposure depends on three things: the JVM build, the processor's capabilities, and whether attacker-controlled data reaches the affected decoder. The hardware requirement is x86‑64 with AVX-512 VBMI. Many current cloud instances, for example AWS c6i, have this capability.

Affected branches and fixed builds are:

Branch Affected Fixed in
Java 17 17.0.6 through 17.0.21 [redacted]
Java 21 up to 21.0.13 [redacted]
Java 25 up to 25.0.5 [redacted]
Java 27 up to 27.0.1 [redacted]
Oracle Java 8 Enterprise Performance Pack 8u511b33-perf 8u513

The fixed versions above are Oracle/OpenJDK builds. Other distributions carry the same code, including Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SapMachine, Red Hat OpenJDK and Oracle GraalVM. Their fixes were still rolling out, so each vendor's patched build needs to be confirmed. Standard OpenJDK 8 and 11 do not contain the vulnerable decoder, but they do have separate November 2026 security updates that administrators should also apply.

Finding it

The weakness is a heap out-of-bounds write in the hardware-accelerated Base64 decoder. On vulnerable systems, specially crafted Base64 input can make the JVM write beyond the end of an allocated heap buffer. Calif published only a safe reproducer and withheld its product-specific exploits.

A common mix-up to avoid: some early posts claimed Java4Shell was "fixed in 17.0.11 and 21.0.3". That refers to an older, unrelated Base64 bug (JDK-8321599). Those versions are not protected against CVE-2026‑114938.

Exploitation

Calif demonstrated pre-authentication RCE against default installations of Jenkins, Jira, Confluence, Keycloak, Artifactory and PingFederate, and withheld its product-specific exploits. What follows is the exposure-checking and mitigation procedure from the write-up.

Step 1: Identify the Java runtime version

Bash
java -version

This reports the runtime in use. Checking only the system's default java binary is not enough: Java runtimes bundled inside containers, application servers, CI/CD platforms and third-party enterprise products must also be inspected.

Step 2: Check for the required CPU instruction set

Bash
grep -o avx512vbmi /proc/cpuinfo | head -1

If the command returns avx512vbmi, the processor supports the instructions involved. That alone does not prove the system is exploitable, but it marks the host for further investigation.

Step 3: Apply the fix or a stopgap

The preferred fix is to install the patched Java runtime for your distribution and restart affected services. If you cannot patch immediately, disable the vulnerable Base64 intrinsic with this JVM startup option:

Text
-XX:-UseBASE64Intrinsics

This flag stopped the overflow on every affected version researchers tested and is safe on any CPU architecture. For containers, the workload must be recreated so the running JVM actually picks up the new option.

Two cautions before rolling out mitigations at scale:

  1. Avoid -XX:UseAVX=2 as a blanket setting. It disables AVX-512 paths on x86-64, but JVMs on ARM fail to start with it, and it can reduce performance elsewhere.
  2. Do not use -XX:DisableIntrinsic=_base64_decodeBlock as written. It has been circulating as a fix, but on its own it prevents the JVM from starting. Pushed through JAVA_TOOL_OPTIONS, it can take down an entire fleet.

These are temporary measures, not substitutes for patching. Test any JVM flag change before deploying it across production.

Root cause

The mistake is in an AVX-512 optimised Base64 decoding routine in OpenJDK's HotSpot JVM: specially crafted Base64 input causes a write beyond the end of an allocated heap buffer. Because the vulnerable code lives in the JVM rather than in application code, the vulnerable operation can run before authentication completes. Whether a given system is reachable depends on the JVM build, the CPU's AVX-512 VBMI support and whether attacker-controlled data reaches the affected decoder.

Impact

Successful exploitation can potentially result in:

  • Remote code execution without valid credentials
  • Exposure of sensitive data held in process memory
  • JVM crashes and denial of service
  • Compromise of enterprise application servers
  • Follow-on attacks against connected systems, depending on the compromised application's privileges

Not every Java application is automatically exploitable. The flaw is especially significant for organisations running Java-based authentication platforms, CI/CD infrastructure, enterprise applications and internet-facing services.

As of November 18, the Canadian Centre for Cyber Security, Tenable and other researchers reported no known active exploitation, and the CVE had not been added to CISA's Known Exploited Vulnerabilities (KEV) catalogue. Because the vulnerability leaked before the patch and the root cause is now public, researchers expect working exploit chains to appear quickly. Working exploitation under controlled conditions does not mean criminals have already compromised production systems, but given CISA's alert and the breadth of exposure, this should be treated as an urgent patching event.

Fix

On November 17, 2026, the OpenJDK Vulnerability Group confirmed the issue and Oracle shipped fixed builds. The fixed versions are listed in the table above. Other distributions carry the same code and their fixes were still rolling out, so confirm each vendor's patched build. Standard OpenJDK 8 and 11 do not contain the vulnerable decoder but should receive their separate November 2026 security updates.

Where patching is not immediately possible, -XX:-UseBASE64Intrinsics is the stopgap, with the two cautions above about -XX:UseAVX=2 and -XX:DisableIntrinsic=_base64_decodeBlock.

Immediate priorities for security teams:

  1. Inventory every JVM, including bundled and containerised runtimes.
  2. Check processor support for AVX-512 VBMI.
  3. Apply your vendor's fixed release, or deploy -XX:-UseBASE64Intrinsics as a stopgap.
  4. Prioritise internet-facing and authentication services such as Keycloak, Jenkins, Jira, Confluence and PingFederate.
  5. Monitor for JVM crashes and unusual Base64-heavy requests while patching completes.

Variants to test

  • Bundled and containerised runtimes. Inspect JVMs inside containers, application servers, CI/CD platforms and third-party enterprise products rather than only the default java binary. A positive result is an affected version string from java -version in any of those locations.
  • Non-Oracle distributions. Check Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SapMachine, Red Hat OpenJDK and Oracle GraalVM builds against their vendor advisories. A positive result is a build that still carries the vulnerable decoder.
  • AVX-512 VBMI hosts. Run the grep check on candidate hosts, including cloud instance types such as AWS c6i. A positive result is avx512vbmi in the output, which marks the host for further investigation.
  • Base64-heavy request paths. Monitor for unusual Base64-heavy requests and JVM crashes while patching completes. A positive result is a JVM crash or unusual Base64-heavy requests while patching completes.
  • Version confusion. Treat claims that 17.0.11 and 21.0.3 are fixed as referring to JDK-8321599 only.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A serious security flaw has been found in Java, a piece of software that runs on millions of computers and servers around the world. The flaw is called Java4Shell and has the official tracking number CVE-2026‑114938. A CVE number is like a case number that security organisations give to a publicly known vulnerability so everyone can refer to the same thing.

In simple terms, an attacker who can send specially crafted data to a server running the affected version of Java may be able to break into it without needing a username or password. They could read information the server is holding in memory, crash it, or in the worst case run their own commands on it. This kind of break-in is called remote code execution, or RCE: someone far away, over the network, gets the machine to run code of their choosing.

The research firm Calif found and reported the flaw. It showed that the attack works against default installations of widely used business applications, including Jenkins, Jira, Confluence, Keycloak, Artifactory and PingFederate. Those are tools that companies use to build software, track work, manage logins and store files.

What makes this unusual is where the flaw lives. Most vulnerabilities sit in one application or one add-on library. Java4Shell sits inside the Java Virtual Machine (JVM), the engine that runs Java programs. If you think of a Java application as a tenant in a building, the JVM is the building itself. A problem in the building affects every tenant.

From the original on mhmmuneef.medium.com

Update (Nov 18): CISA, the US government's cybersecurity agency, issued an alert urging organisations to patch immediately. Details of the flaw leaked before the patch. On November 17 the OpenJDK Vulnerability Group confirmed the issue, Oracle shipped fixed builds, and Calif published its technical write-up.

Java4Shell at a glance

  • CVE identifier: CVE-2026‑114938
  • Severity: Critical
  • CVSS v4.0: 9.2 (researcher assessment)
  • CVSS v3.1: 8.1 (Oracle; high attack complexity, no privileges or user interaction required)
  • Vulnerability type: Heap out-of-bounds write in the hardware-accelerated Base64 decoder
  • Affected Java branches: 17, 21, 25, 27 (plus Oracle Java 8 Enterprise Performance Pack)
  • Authentication required: None, where attacker-controlled Base64 reaches the vulnerable decoder
  • Hardware requirement: x86‑64 with AVX-512 VBMI
  • Fix released: November 17, 2026
  • Exploited in the wild: Not reported as of November 18; not listed in CISA KEV

A few of those terms need unpacking. CVSS is a scoring system for how bad a vulnerability is; scores run from 0 to 10, and anything above 9 is usually called critical. The two scores here differ because the researcher and Oracle assessed the difficulty of exploiting it differently. Authentication means proving who you are, usually with a password or a token. "No authentication required" means the attacker does not need an account at all. In the wild means criminals have actually been seen using it against real systems, as opposed to only in a lab. CISA KEV is a public list of vulnerabilities that are known to be exploited; being absent from it is a good sign, not a guarantee.

What makes Java4Shell dangerous?

The flaw is in a routine inside OpenJDK's HotSpot JVM that decodes Base64. Base64 is a way of turning arbitrary bytes into plain text characters so they can travel safely through systems that only expect text. It is used constantly: in login headers, in API requests, in tokens, in certificates and in encoded application data. An API is the doorway one program uses to talk to another, and a token is a small piece of data that stands in for a password, a bit like a cloakroom ticket: you show the ticket, not your coat.

On vulnerable systems, specially crafted Base64 input can make the JVM write past the end of a reserved area of memory. Memory is handed out in blocks called a heap, and writing beyond a block is called an out-of-bounds write. Imagine writing a long sentence on a form and continuing onto the desk beside it: whatever was there gets overwritten.

Successful exploitation can potentially result in:

  • Remote code execution without valid credentials
  • Exposure of sensitive data held in process memory
  • JVM crashes and denial of service
  • Compromise of enterprise application servers
  • Follow-on attacks against connected systems, depending on the compromised application's privileges

The vulnerable operation can run before an application finishes authenticating a user. That is why it is called pre-authentication: the damage can happen at the front door, before anyone has shown a password. Even so, not every Java application is automatically exploitable. Exposure depends on the JVM build, the processor's capabilities and whether attacker-controlled data reaches the affected decoder.

Affected Java versions and fixes

  • Java 17: 17.0.6 through 17.0.21 → fixed in [redacted]
  • Java 21: up to 21.0.13 → fixed in [redacted]
  • Java 25: up to 25.0.5 → fixed in [redacted]
  • Java 27: up to 27.0.1 → fixed in [redacted]
  • Oracle Java 8 Enterprise Performance Pack: 8u511b33-perf → fixed in 8u513

Java version numbers look odd at first. The first number is the major release (17, 21, 25, 27), and the numbers after it are updates within that release. A version like [redacted] is a patched build of Java 17. If your server runs a version in the "affected" column, it needs updating.

The fixed versions above are Oracle/OpenJDK builds. Other distributions carry the same code, including Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SapMachine, Red Hat OpenJDK and Oracle GraalVM. A distribution is a repackaged copy of Java maintained by a different company, the way different shops sell the same brand of flour in their own bags. Their fixes are still rolling out, so confirm each vendor's patched build.

Standard OpenJDK 8 and 11 do not contain the vulnerable decoder. They do have separate November 2026 security updates, which administrators should also apply.

Beware of a common mix-up: some early posts claimed Java4Shell was "fixed in 17.0.11 and 21.0.3." That refers to an older, unrelated Base64 bug (JDK-8321599). Those versions are not protected against CVE-2026‑114938.

How to check whether your server is vulnerable

Before you can fix anything, you need to know what you are running. The check has two parts: which Java version is installed, and whether the machine's processor has the feature the vulnerable code uses.

First, identify the Java runtime version:

Bash
java -version

This is a command you type in a terminal, the text window where you give a computer instructions. java is the program, and -version is an option telling it to print its version instead of running something. The output tells you which Java build is in use, which you then compare against the affected list above.

Next, check whether the Linux host exposes the required CPU instruction set:

Bash
grep -o avx512vbmi /proc/cpuinfo | head -1

Line by line: grep is a search tool. -o tells it to print only the matching text, not the whole line. avx512vbmi is the name of a set of processor instructions. /proc/cpuinfo is a file on Linux that lists what the processor can do. The vertical bar | passes the result to the next command. head -1 keeps only the first line of output.

If the command returns avx512vbmi, the processor supports the instructions involved. That alone does not prove the system is exploitable, but it marks the host for further investigation. Many current cloud instances, for example AWS c6i, have this capability. A cloud instance is a rented virtual computer running in a data centre.

Also inspect Java runtimes bundled inside containers, application servers, CI/CD platforms and third-party enterprise products. A container is a lightweight package holding an application and everything it needs, including its own copy of Java. CI/CD is the automated pipeline that builds and ships software. Checking only the system's default java binary is not enough, because each of these can carry its own hidden copy.

Immediate mitigation and remediation

The preferred fix is to install the patched Java runtime for your distribution and restart affected services.

If you cannot patch immediately, disable the vulnerable Base64 intrinsic with this JVM startup option:

Text
-XX:-UseBASE64Intrinsics

An intrinsic is a shortcut inside the JVM that swaps a normal piece of Java code for a faster, hand-tuned version written for a specific processor. This option switches that shortcut off. The leading minus sign after -XX: means "turn this feature off". This flag stopped the overflow on every affected version researchers tested and is safe on any CPU architecture. For containers, the workload must be recreated so the running JVM actually picks up the new option.

Two cautions before you roll out mitigations at scale:

  1. Avoid -XX:UseAVX=2 as a blanket setting. It disables AVX-512 paths on x86-64, but JVMs on ARM fail to start with it, and it can reduce performance elsewhere. ARM is a different family of processors, common in some servers and in many laptops.
  2. Do not use -XX:DisableIntrinsic=_base64_decodeBlock as written. It has been circulating as a fix, but on its own it prevents the JVM from starting. Pushed through JAVA_TOOL_OPTIONS, it can take down an entire fleet. JAVA_TOOL_OPTIONS is an environment variable, a setting the operating system passes to programs; if it is set centrally, every Java process on every machine picks it up at once.

These are temporary measures, not substitutes for patching. Test any JVM flag change before deploying it across production. Production means the systems real users and customers depend on, as opposed to test machines.

Has Java4Shell been exploited in the wild?

As of November 18, the Canadian Centre for Cyber Security, Tenable and other researchers report no known active exploitation, and the CVE has not been added to CISA's Known Exploited Vulnerabilities (KEV) catalogue.

Calif has withheld its product-specific exploits and published only a safe reproducer. A reproducer is a small, safe example that demonstrates a bug. However, because the vulnerability leaked before the patch and the root cause is now public, researchers expect working exploit chains to appear quickly. An exploit chain is a sequence of steps that turns a bug into a full break-in.

Working exploitation under controlled conditions does not mean criminals have already compromised production systems. But given CISA's alert and the breadth of exposure, treat this as an urgent patching event.

Final assessment

Java4Shell shows that even memory-managed platforms like Java can hide serious memory-safety weaknesses in their native runtime code. Memory-managed means the platform normally handles memory for the programmer, which many people assume makes such bugs impossible.

For security teams, the immediate priorities are:

  1. Inventory every JVM, including bundled and containerised runtimes.
  2. Check processor support for AVX-512 VBMI.
  3. Apply your vendor's fixed release, or deploy -XX:-UseBASE64Intrinsics as a stopgap.
  4. Prioritise internet-facing and authentication services such as Keycloak, Jenkins, Jira, Confluence and PingFederate.
  5. Monitor for JVM crashes and unusual Base64-heavy requests while patching completes.

The bigger lesson: vulnerability management cannot stop at application dependencies. The underlying runtime, bundled software and hardware-specific execution paths all belong in your security assessments.

Glossary

  • API: the doorway one program uses to talk to another, usually over the network.
  • Authentication: proving who you are, typically with a password or token.
  • AVX-512 VBMI: a set of processor instructions that let certain operations, including Base64 decoding, run very fast.
  • Base64: a way of encoding arbitrary bytes as plain text so they can pass safely through text-only systems.
  • CI/CD: the automated pipeline that builds, tests and ships software.
  • Cloud instance: a rented virtual computer running in a data centre.
  • Container: a lightweight package holding an application plus everything it needs, including its own runtime.
  • CVE: a public case number given to a known vulnerability.
  • CVSS: a scoring system from 0 to 10 for the severity of a vulnerability.
  • Distribution: a repackaged copy of Java maintained by a particular vendor.
  • Exploit chain: a sequence of steps that turns a bug into a full break-in.
  • Heap: the area of memory a program uses for data it creates while running.
  • Intrinsic: a fast, processor-specific shortcut the JVM uses in place of ordinary code.
  • In the wild: seen being used against real systems, not just in a lab.
  • JVM (Java Virtual Machine): the engine that runs Java programs.
  • KEV: CISA's catalogue of vulnerabilities known to be exploited.
  • Memory-managed: a platform that handles memory allocation for the programmer automatically.
  • Out-of-bounds write: writing data past the end of a reserved block of memory.
  • Pre-authentication: happening before a user has logged in.
  • Production: the live systems real users depend on.
  • RCE (remote code execution): getting a remote machine to run code of the attacker's choosing.
  • Reproducer: a small, safe example that demonstrates a bug.
  • Token: a piece of data that stands in for a password, like a cloakroom ticket.
  • Vulnerability: a weakness in software that an attacker can use to cause harm.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.