Security

Java4Shell (CVE-2026-114938): How to Check and Patch Your Java Services

Java4Shell, a critical OpenJDK flaw disclosed November 17, 2026, needs a runtime patch and image rebuilds. Here is how to check and fix it.

Marcus Oyelaran

Security & DevOps Specialist

Published 7 min read
Padlocks fastened to a chain, a symbol of locking down systems.
On this page 7 sections

Java4Shell (CVE-2026-114938) is a critical OpenJDK flaw in the Base64 decoder that can lead to remote code execution. It hits Java 17.0.6 and later on x86-64 CPUs with AVX-512 VBMI. Check your Java build and CPU flags, install your vendor's November 17 fix, and rebuild every container image.

This guide is for engineers who run Java services and need to know within an hour whether Java4Shell touches them. It covers who is exposed, the exact checks to run, how to patch hosts and images, and what to do if you cannot patch today.

Backtrace tracks vulnerability advisories for what the fix actually requires, not just the severity score. For Java4Shell, that means a runtime upgrade plus an image rebuild.

What Java4Shell Is and Why Base64 Input Matters

On November 17, 2026, Cisco Talos published an advisory on Cisco Talos's Java4Shell advisory. It describes a critical OpenJDK vulnerability with a CVSS 4.0 score of 9.2. A malformed Base64 value sent to an affected JVM can lead to unauthenticated remote code execution.

Microsoft's security team explains the mechanism in its Java4Shell upgrade guidance. The bug sits in OpenJDK's hardware-accelerated Base64 decoder. Crafted input can corrupt heap memory, which can cause a crash, leak data or run attacker code.

Talos credited Calif.io with sharing the details with vendors before the public disclosure. That early notice helped vendors ship fixed builds within a day for several distributions. It also means the exploit details are now public, so assume attackers are reading them too.

Base64 is everywhere in a typical Java service. Session cookies, JSON Web Tokens, Basic auth headers, uploaded files and API payloads often carry Base64 values. That is why the attack surface is wider than it first looks.

Memory corruption is a serious class of bug. A crash is the mildest result. In the worst case, an attacker overwrites memory the program meant to keep private and takes control of the process. Microsoft lists all three outcomes for this flaw.

The flaw is only reachable when attacker-controlled input actually reaches the vulnerable decoder. Exposure depends on your application, but a public-facing service that decodes Base64 from a request is the clearest case.

Is Your Java Service Exposed to Java4Shell?

A close-up of a computer motherboard with a CPU socket and circuits.

Your service is exposed if three things are true. It runs an unpatched OpenJDK-based runtime from 17.0.6 onward, including Java 21, 25 and 27. It runs on an x86-64 CPU with AVX-512 VBMI. Untrusted Base64 input can reach it.

Microsoft says ARM64 systems and x86-64 processors without AVX-512 VBMI are not known to be affected. Talos notes that the needed CPU features appear in common Intel and AMD processors, so the pool of vulnerable servers is large in both cloud and on-premises setups.

The table below summarizes the exposure picture from the Microsoft and Talos advisories.

Is Your Java Service Exposed to Java4Shell?
SetupExposure
OpenJDK 17.0.6 or later, x86-64 with AVX-512 VBMIAffected until patched
OpenJDK 17.0.6 or later, x86-64 without AVX-512 VBMINot known to be affected
OpenJDK 17.0.6 or later, ARM64Not known to be affected
Java builds older than 17.0.6Outside the affected range in the advisories

There is an important caveat. The advisories describe what is known so far, and researchers are still testing more applications. Treat "not known to be affected" as a reason to prioritize, not a reason to skip the patch.

At the time of the Talos advisory, no exploitation in the wild had been observed. Talos expected probing attempts to pick up soon after disclosure. A quiet first week is not a safe signal.

How to Check Your Java Version and CPU Flags for Java4Shell

Two quick checks tell you whether a workload is in scope. Security vendor Cycode documents both in its Java4Shell exposure guide. The first finds the Java version. The second inspects the CPU on the host that runs the workload.

Run these commands in order.

  1. On a host, run java -version and note the exact build number.
  2. For a container image, run docker run --rm --entrypoint java IMAGE -version and replace IMAGE with the tag you deploy.
  3. On the host that will run the workload, list the CPU flags with grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'.

The host is affected only if all four flags print. If one is missing, the workload falls outside the known conditions, though you should still plan to patch.

Check every layer where Java hides. Application servers, build agents, search clusters, message brokers and identity tools such as Keycloak all ship with a bundled or system Java. A Dockerfile that uses a floating tag keeps the old runtime until someone rebuilds the image.

Write the results into a simple table with the service name, Java build, CPU result and internet exposure. That table becomes your patch order.

Use this priority order when the list is long.

  1. Internet-facing services that decode Base64 from cookies, tokens or uploads.
  2. Internal services that accept data from partners or from other services you do not control.
  3. Build agents and tooling that process outside code.
  4. Everything else, on the normal patch schedule.

How to Patch Java4Shell on Hosts and Container Images

A hand holding a smartphone that shows a list of pending software updates.

Updating the Java runtime is the primary fix. Microsoft states this directly and says its WAF rules complement patching rather than replace it. Install the build that your Java vendor released for the November 17 fix.

Vendors shipped fixed builds on different days, so check your own. The Microsoft Build of OpenJDK November 2026 update lists 25.0.5.1, 21.0.13.1 and 17.0.21.1 as the fixed releases for its distribution. Other distributions use different version numbers.

Work through the patch in this order.

  1. Pick the vendor build that contains the fix for your Java line.
  2. Update hosts that run Java directly, then restart the services.
  3. Change base images in your Dockerfiles to the fixed tag and rebuild every image that bundles Java.
  4. Pull rebuilt images fresh, because some vendors kept the same version tags for their fixed images.
  5. Redeploy, then rerun the version check against the running workload, not just the build output.

The last step matters most. A rebuilt image proves nothing until the running container reports the fixed version. Query a live pod or host after the rollout and record the result next to the ticket. That record answers the question every security lead asks in the next review.

Rebuilds are where hurried patches go wrong. A pipeline that is red for unrelated reasons tempts people to skip a gate. If your CI is noisy, our guide on how to find and fix flaky tests in CI will help you trust the signal again.

If you are also behind on the runtime line itself, treat this as the push to move. Our walkthrough of upgrading to JDK 27 covers what changes between major versions.

Interim Java4Shell Mitigations When You Cannot Patch Yet

A security shield graphic over a computer, illustrating interim protection while patching.

Some services cannot restart today. In that case, Talos names one primary stopgap: start the JVM with AVX-512 support disabled using -XX:UseAVX=2. This works only on x86-64.

The flag is dangerous on the wrong hardware. Talos warns that ARM-based processors do not recognize it, and the JVM will likely fail to start. Cycode also lists -XX:-UseBASE64Intrinsics as a second option. You can set either through the JAVA_TOOL_OPTIONS environment variable so you do not need to edit launch scripts.

A web application firewall can add a layer. Microsoft published Azure Web Application Firewall rules that block malformed Base64 in headers, request bodies, query strings and the Authorization header. Treat them as supplementary protection, since they only cover known HTTP patterns.

Whichever stopgap you pick, log it. Note the service, the flag, the date and who owns the real patch. A mitigation with no owner has a habit of living for a year.

The same discipline applies to any supply chain incident. Our guide to auditing npm trusted publisher bindings after SlugFest shows how to turn an advisory into a checklist with names and dates attached.

What to Watch for After You Patch Java4Shell

Patching closes the hole, but it does not tell you whether someone used it first. Look back through logs from November 17 onward for unusually long Base64 values in headers, cookies and request bodies. Check for crashes and restarts in Java processes, since memory corruption often shows up as instability first.

A rough log search helps. Run grep -E '[A-Za-z0-9+/]{200,}={0,2}' access.log to list requests with very long Base64-like values, then read the matches by hand. It will produce false positives, because legitimate tokens can be long too.

Also look for Java processes that start shells or unfamiliar child processes. A web server that spawns a shell is a strong signal on its own, whatever the cause.

Finally, confirm that no image in your registry still carries the old runtime. An old image that nobody deploys today can be redeployed by a rollback tomorrow. Tag or retire it.

Conclusion

Java4Shell is a patch-and-rebuild problem. Check which services run an affected Java build on AVX-512 VBMI hardware, install your vendor's fixed release, and rebuild every image that bundles Java. Use the UseAVX=2 flag only as a short, owned stopgap on x86-64. Backtrace recommends starting with the public-facing services today.

What is Java4Shell (CVE-2026-114938)?
Java4Shell is a critical OpenJDK vulnerability disclosed on November 17, 2026. It sits in the hardware-accelerated Base64 decoder, and a crafted Base64 value can corrupt heap memory. That can cause a crash, expose data or allow unauthenticated remote code execution. Cisco Talos rates it 9.2 on CVSS 4.0.
Which Java versions and CPUs does Java4Shell affect?
The advisories say it affects unpatched OpenJDK-based runtimes from 17.0.6 onward, including Java 21, 25 and 27, on x86-64 CPUs with AVX-512 VBMI. ARM64 systems and x86-64 processors without AVX-512 VBMI are not known to be affected, though researchers are still testing more applications.
How do I fix Java4Shell if I run containers?
Update the Java runtime to your vendor's fixed build, change the base image in each Dockerfile, and rebuild every image that bundles Java. Pull the rebuilt images fresh, since some vendors reused version tags. Then redeploy and run the version check against the live workload to confirm the fix.
Is the UseAVX=2 flag a safe workaround for Java4Shell?
It is a stopgap, not a fix. Starting the JVM with -XX:UseAVX=2 disables AVX-512 on x86-64, which Talos names as the primary interim mitigation. ARM processors do not recognize the flag and the JVM will likely fail to start. Apply the real patch as soon as you can.

Written by

Marcus Oyelaran

Security & DevOps Specialist

11+ years experience

Marcus Oyelaran spent eleven years moving between platform and security teams, including four years as a security engineer embedded inside a DevOps org at a healthcare SaaS company handling PHI at scale. He's run more incident postmortems than he can count, and most of what he writes for Backtrace comes directly out of those postmortems: the secret that leaked through a build log, the IAM policy that was too permissive by one wildcard, the deploy that skipped a gate because someone was in a hurry. He holds an OSCP and spends an unreasonable amount of time arguing about supply chain security on internal Slack channels.

Credentials

  • OSCP (Offensive Security Certified Professional)
  • 11 years in DevOps and security engineering
  • Former security engineer, healthcare SaaS platform (HIPAA-regulated infrastructure)