Java4Shell is a flaw in Java that lets an attacker run their own code on a server, known as remote code execution (RCE). It works before login (pre-auth). The flaw sits in the Base64 decoder of the Java Virtual Machine (JVM), and Oracle released the fix on 17 November 2026.

The attack works before login because servers decode some Base64 data early. HTTP Basic login headers, single sign-on (SAML) artifacts and anti-forgery (CSRF) tokens are often decoded before the server checks who is logged in.

Java is designed to be memory-safe, so memory corruption flaws like this one are rare in Java software. Java4Shell sits underneath that protection, in the JVM's own optimised code, and can be reached before login in the default setups of business tools such as Jira, Confluence, Jenkins and Keycloak.

What is Java4Shell?

Java4Shell is a memory corruption vulnerability in the Base64 decoder of the x86-64 HotSpot JVM that can let an attacker run code without logging in. HotSpot is part of the Java Development Kit (JDK). The US Cybersecurity and Infrastructure Security Agency (CISA) calls it critical and urges organisations to patch immediately.

The key facts:

  • CVE ID: CVE-2026-114938 (CVE is the public catalogue of known security flaws)
  • Component: the fast path of the HotSpot Base64 decoder, used on x86-64 chips with AVX-512 VBMI, a set of vector instructions
  • Severity: 8.1 on CVSS (Common Vulnerability Scoring System) 3.1 from Oracle, and 9.2 on CVSS 4.0 from Calif.io
  • Found by: Calif.io. Oracle credits Quang Luong of Calif.io and Albert Yang
  • Fixed: 17 November 2026, in Oracle's Critical Security Patch Update, which carries 655 security patches in total

Java code is memory-safe because the language checks every array access. The JVM that runs it is written in C++, and for methods that run often it swaps in hand-tuned machine code that skips those checks. According to The Hacker News, a malformed Base64 string ending in an extra = makes that fast decoder write 62 or 63 bytes past its output. Java rejects the string, but only after the write.

According to The Register, Calif.io, which also helped find php2shell, named the flaw. Calif says it spent about $200 worth of AI tokens finding it.

Which Java versions are affected by Java4Shell?

Java4Shell affects unpatched Java 17 builds from 17.0.6, and unpatched Java 21, 25 and 27, on x86-64 chips with AVX-512 VBMI. Standard Java 8 and Java 11 do not contain the vulnerable code, and servers with ARM64 chips do not run it.

Two less common builds are also affected, according to Oracle and The Hacker News:

  • Java SE 8 Performance Pack: build 8u511b33-perf
  • GraalVM: GraalVM for JDK 17.0.21.0.3, GraalVM for JDK 21.0.13.0.3 and GraalVM Enterprise Edition 21.3.20.0.3

Which servers run the vulnerable code?

The vulnerable code runs on Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids chips, and on AMD Zen 4 or newer. Because it depends on the chip, the same container image can be exposed on one server and not on another. A one-line Linux check in the response checklist shows whether a server's chip qualifies.

Which apps can be attacked before login?

Calif's attacks worked without a login under the default settings of six applications, The Hacker News reports:

  • Keycloak
  • Atlassian Jira
  • Atlassian Confluence
  • JFrog Artifactory
  • Jenkins
  • PingFederate

With a login, the attacks also worked on Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit and Spinnaker. The researchers say both lists are incomplete. Calif also says a Java program that opens a TLS (Transport Layer Security) connection to a malicious server can be compromised. It has not published how.

Java bundled in other products

Many products ship their own Java runtime, so they can be exposed even when no Java is installed on the host itself. Those products need an update from their maker, not a Java update you install yourself.

How to fix Java4Shell

To fix Java4Shell, update to a fixed Java build and restart every Java service. Rebuild and redeploy container images so the running process uses the new build. Where no fixed build exists yet, a JVM flag closes the vulnerable path until it does.

Fixed Java releases

Oracle and the OpenJDK project released fixes on 17 November. As of 18 November, The Hacker News and Eclipse Temurin's advisory list these fixed builds:

Java4Shell: fixed Java releases as of 18 November 2026
Java build Fixed release
Oracle Java SE 17, 21, 25 and 27 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1
Java SE 8 Performance Pack 8u513
Oracle GraalVM GraalVM for JDK 17.0.21.1, GraalVM for JDK 21.0.13.1 and GraalVM Enterprise Edition 21.3.20.1
Amazon Corretto 17, 21, 25 and 27 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2 and 27.0.1.1.4
Azul Zulu 17, 21, 25 and 27 (free builds) 17.70.201, 21.54.201, 25.38.201 and 27.30.201
Red Hat Enterprise Linux 8, 9 and 10, Red Hat build of OpenJDK 17, 21 and 25 None yet
Eclipse Temurin 17, 21, 25 and 27 27.0.1.1+4 published; 17.0.21.1+2, 21.0.13.1+2 and 25.0.5.1+2 announced, binaries pending
Microsoft Build of OpenJDK, BellSoft Liberica No fixed builds listed

If you cannot patch yet

Start the JVM with one of two flags, and remove it once the fixed build is installed:

  • -XX:-UseBASE64Intrinsics turns off only the fast Base64 code, which removes the vulnerable path and keeps other AVX-512 speedups.
  • -XX:UseAVX=2 turns off AVX-512 entirely. Use it only on x86-64 servers, because Java on ARM64 fails to start with it.

Both flags stopped the overflow in Upwind's lab tests, according to The Hacker News. Upwind also warns that -XX:DisableIntrinsic=_base64_decodeBlock stops Java from starting when used on its own. CISA also lists temporary controls, namely validating Base64 input at the application boundary, enforcing input-size limits and limiting unauthenticated access.

Response checklist

  1. Find every Java runtime, internet-facing first. Include runtimes bundled in third-party apps, container images and appliances, as covered in where Java hides.
  2. Check the chip. On Linux, run grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'. The server can run the vulnerable code only if all four flags appear.
  3. Patch. Install the fixed build from the table above, or the maker's update for products that bundle Java.
  4. Restart and redeploy. Restart Java services, then rebuild and redeploy container images so no process keeps running the old build.
  5. Use a stopgap where no fix exists. On Red Hat and Microsoft builds, and Temurin 17, 21 and 25 until their fixed binaries are published, apply one of the two flags. Limit unauthenticated access until fixed builds ship.
  6. Watch for attempts. Upwind, cited by The Hacker News, suggests looking for Base64 tokens of 32 or more characters that end in =. Flag those whose length is not a multiple of 4, checking Authorization headers first. Also look for bursts of IllegalArgumentException from java.util.Base64$Decoder, and for unexplained hs_err_pid crash logs or restart bursts. CISA adds rogue runtimes, unexpected JVM crashes and suspicious Java processes. None of these signs proves a compromise.

Is Java4Shell being exploited?

No attacks had been reported as of 18 November 2026. Cisco Talos has not seen Java4Shell used in the wild but expects probing attempts soon after disclosure, according to The Register. Canada's Cyber Centre is not aware of any attacks, The Hacker News reports, and Java4Shell is not in CISA's Known Exploited Vulnerabilities (KEV) catalog.

No single exploit works everywhere, because each target needs its own memory layout and timing. Calif has not published its exploit code, and other labs have reproduced crashes and a memory leak, but not code execution, The Hacker News reports. A failed attempt can crash Java, and an attacker can often retry.

Still, an input that triggers the overflow is already public. It appeared on 9 September in an OpenJDK pull request, which was closed unmerged in early November. Calif.io also says news of the flaw leaked before disclosure, The Register reports.

A proxy that waits for complete requests, as nginx does by default, blocks some attacks but not all. Treat it as partial cover while you patch, internet-facing systems first.

Where is Java hiding in your environment?

Java often runs inside other products. CISA warns that JDKs and Java runtimes bundled with third-party applications, container images and appliances may not appear as separate entries in software inventories.

Look in these places:

  • Self-hosted business tools: Jira, Confluence, Jenkins and Artifactory each run on Java.
  • Identity and login services: Keycloak and PingFederate handle logins for other systems, so check whether yours face the internet.
  • Container images: each image carries its own Java, so patching the host leaves the image unchanged.
  • Vendor products and appliances: these ship their own runtime and need the maker's update.
  • Tools set up outside IT: a test Jenkins or Keycloak server a team started on its own is shadow IT until someone finds it.

Start with what is reachable from the internet, because those systems can be attacked before login. Mapping your external attack surface gives you that list.

What a scan can and cannot show

An external scan shows which hosts and web services you expose to the internet, including any Jira, Jenkins or Keycloak login page. That gives you a patch-first list of the Java-backed services attackers can reach before login.

But a vulnerability scan from outside cannot see the JDK version inside an application or the chip features of the server it runs on. On the host, compare the running Java build with the fixed releases table and run the chip check from the response checklist.

Read-only access · Working scan data deleted after each scan · EU-hosted

Frequently asked questions

Is Java4Shell the same as Log4Shell?

No. Log4Shell, the 2021 Log4j vulnerability, was one of the worst software flaws ever. It was in the Log4j logging library, which the Apache Log4j security page lists as fixed from Log4j 2.15.0 for Java 8 and later. Java4Shell is in the JVM itself, so you fix it by updating Java, not a library.

Is Java still a security risk?

The Java language is memory-safe, so memory corruption bugs are rare in Java code. The risk is unpatched Java runtimes, often bundled inside apps and container images that nobody tracks. Every runtime needs an owner and a patch date.

Can I protect against Java4Shell without patching?

Only for a short time. Starting the JVM with a flag that turns off the fast Base64 decoder, or AVX-512 on x86-64 servers, closes the vulnerable path. Each flag needs a restart, and you should remove it once a fixed Java build is installed.

Filed under
  • Java4Shell
  • CVE-2026-114938
  • Java vulnerability
  • Java RCE