Java4Shell: Finding Exposed Java Services and Hunting CVE-2026-114938

Java4Shell: Finding Exposed Java Services and Hunting CVE-2026-114938

Ajmal Kohgadai
Ajmal Kohgadai
November 17, 2026

Java4Shell, tracked as CVE-2026-114938, is a flaw in the code Java uses to decode Base64 text on many recent Intel and AMD processors. A malformed Base64 string can make that code write past the end of its buffer and corrupt the server's memory. Where an application decodes such a string with Java's built-in decoder before it checks credentials, the attacker does not need to log in.

The flaw has been in Java 17 builds since January 2023, and in every release from Java 18 on, including 21, 25 and 27. Oracle and OpenJDK shipped fixes on November 17, 2026.

Calif, the security firm that named the bug, published its write-up the same day. It describes code execution on Jira, Confluence, Jenkins and Keycloak servers without credentials, and says its researcher found the flaw with an AI coding agent. No exploitation in the wild had been reported as of that day, and Calif has not released its exploits. The OpenJDK advisory scores the flaw 8.1 under CVSS 3.1, and Calif's write-up gives it 9.2 under CVSS 4.0.

The question leadership will ask first is whether any of the organization's Java services were exposed, and how quickly the team can tell. The name invites a comparison with Log4Shell, the 2021 flaw in the Log4j logging library. Java4Shell sits in the Java runtime itself, as php2shell sat in the PHP interpreter in October, so the fix is a new Java build.

A service is exposed only when three conditions hold at once: it runs an affected build, on an x86-64 processor with AVX-512 VBMI, and it decodes Base64 an attacker controls. The answer takes an inventory of Java runtimes and the processors they run on, a patch order, and a search of request and crash logs for attempts. That search is directed threat hunting: it starts from a named threat and the assets the threat can reach.

{{ebook-cta}}

What Java4Shell is and which Java builds are affected

The bug sits in an intrinsic, a block of hand-written assembly that HotSpot runs in place of the Java code in java.util.Base64 once the JIT compiler has compiled the decoder. HotSpot is the virtual machine in Oracle Java and most OpenJDK builds. On x86-64 processors with AVX-512 VBMI, the decode intrinsic miscalculates how many bytes to store when the input ends in malformed padding.

In Calif's write-up, 64 A characters followed by a single = are enough to make the decoder write 62 bytes past the end of its output array. On Java 17, the trigger is 128 A characters followed by =. Java rejects the input with an exception, but only after the write has happened.

Before Calif published, other researchers doubted its claim of code execution. Equixly and Upwind both read the code and found code execution unproven, because the bytes written past the buffer are always the same.

Calif's write-up describes how it worked around the fixed bytes. Its chain uses the fixed overwrite to corrupt the length of another buffer, which lets it write values of its own choosing. A second corrupted array lets it read heap memory, as Heartbleed did, and that memory can hold private keys and tokens. Calif says each exploit needs heap grooming tuned to the target application, so no single payload works everywhere.

Until someone reproduces that work in public, plan for code execution on any exposed service. Expect a failed attempt to look like a crashed JVM, or like an ordinary rejected request.

Early coverage called it a Java 17 vulnerability, but the OpenJDK advisory lists Java 17, 21, 25 and 27 as affected and places the bug in the HotSpot compiler component. Semgrep adds that every release from Java 18 on is affected, including releases the advisory does not list, such as Java 26. Within Java 17, the vulnerable decoder arrived in 17.0.6, released in January 2023, and Upwind tested 17.0.5 and found it clean. Standard Java 8 and 11 builds are not affected, since neither line has a Base64 decode intrinsic.

Oracle's November 2026 advisory, which credits Calif and a second reporter with the report, adds one Java 8 edition to the list. It names the Java SE 8 Enterprise Performance Pack (8u511b33-perf) as affected, along with Oracle GraalVM for JDK 17 and 21. The CVE record for the flaw also lists GraalVM Enterprise Edition 21.3 as affected, though the advisory's product table leaves it out. The November update also fixes other flaws in standard Java 8 and 11 builds, so those lines need it too.

Which of your Java services are exposed to Java4Shell

The runtime and processor checks take minutes on a host. Whether an application decodes untrusted Base64 is harder to rule out, so use the runtime and processor checks to decide what to patch first, then patch the rest.

Runtime. Check the build each Java process is running, which can differ from what the package manager installed. readlink -f /proc/<PID>/exe shows the binary a process started from, and jcmd <PID> VM.version reports the version of the running JVM where the JDK tools are installed. Run jcmd as the user that started the JVM. A JVM started before an update keeps running the old code until it restarts, so on hosts without the JDK tools, compare each process's start time with the time the update was installed.

Container images and vendor products with a bundled Java runtime need the same check. A container stays on the old build until its image is rebuilt with an updated Java runtime and redeployed, and a vendor product usually waits for the vendor's update.

Processor. The vulnerable code runs only on x86-64 processors with AVX-512 VBMI. Equixly lists Intel Xeon processors from Ice Lake on, including Sapphire Rapids, Emerald Rapids and Granite Rapids, and AMD processors from Zen 4 on. It lists Skylake, Cascade Lake and Cooper Lake Xeons, AMD EPYC Naples, Rome and Milan, Intel desktop chips from Alder Lake on, ARM servers, and x86 code running under emulation as unaffected.

On Linux, grep -c avx512vbmi /proc/cpuinfo returns a count above zero where the feature is present. On Windows and other systems, run java -Xlog:os+cpu=info -version with the service's own Java binary and look for avx512_vbmi in the processor features it lists. Pass no other options, and clear JAVA_TOOL_OPTIONS and the other Java option variables for that command only, since a setting such as -XX:UseAVX=2 hides the features. Run it where the JVM runs, because in a virtual machine the hypervisor decides which processor features the guest sees, and a container reports its host's processor. On Kubernetes clusters that run Node Feature Discovery, the node label feature.node.kubernetes.io/cpu-cpuid.AVX512VBMI marks nodes with the feature.

Use the processor check to order the work, and patch every affected runtime anyway. An autoscaling group or Kubernetes node pool that mixes processor generations can move a service from an unaffected host to an affected one. Semgrep recommends updating regardless of processor, because it is difficult to know whether a given system is affected.

Input. The flaw is reached through the basic and URL-safe decoders in java.util.Base64, and Equixly found that the MIME decoder skips the flawed path. The input also has to be long enough to reach the AVX-512 code: over 128 bytes on Java 17, and over 31 bytes on Java 21 and 25.

Untrusted Base64 often arrives before authentication, in HTTP Basic credentials and JSON Web Tokens. Upwind traced Basic authentication in Spring Security, Tomcat and Jetty 12, and Auth0's java-jwt library, passing an attacker's token to the vulnerable decoder before checking anything. Libraries with their own Base64 code, including Jackson, JJWT, Nimbus JOSE+JWT and Apache Commons Codec, do not reach it through their own decoding, according to Equixly.

Calif's write-up lists pre-authentication code execution against Atlassian Confluence and Jira, Jenkins, Keycloak, JFrog Artifactory and PingFederate, and code execution in sample Spring Boot and Apache Struts applications. It adds post-authentication code execution against Apache Kafka brokers, Apache Solr, Elasticsearch, Gerrit and Spinnaker, and says its lists are not exhaustive. Confirming that an application never decodes untrusted Base64 before login means reading its code and every library on its authentication path, which usually takes longer than patching it.

Calif also reports a client-side exploit: a Java program that opens a TLS connection to a malicious server can be compromised even if it exposes no service of its own. Patch Java clients that connect to servers an outsider can choose, such as those that fetch user-supplied URLs, alongside internet-facing services. Patch in this order:

  • Internet-facing services on affected processors, or on processors you cannot confirm.
  • Internal services on affected processors, which an attacker with a foothold inside the network can reach.
  • Every other runtime on an affected build, including those on unaffected processors today.

How to patch Java4Shell, and what to do before every JVM is updated

The fix is a patched Java build followed by a restart. On internet-facing services, copy any fatal error logs, core dumps and container logs before that restart, since the checks further down rely on them and a redeployment can discard them. For Java 17, 21, 25 and 27, Oracle's fixed Java SE builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Java 18 to 20, 22 to 24 and 26 have no fix in Oracle's update, so upgrade services on those releases to a fixed build of a later line. Oracle's 17.0.21.1 release notes point to the Oracle Critical Patch Update for the list of security fixes, and Oracle's November advisory lists CVE-2026-114938.

Other OpenJDK distributions ship fixes on their own schedules and with their own version numbers. Amazon Corretto 17.0.21.1.2, for example, lists CVE-2026-114938 in its changelog. For Temurin, Zulu, Microsoft, Red Hat and Linux distribution packages, confirm the CVE in each vendor's release notes before marking a host patched.

Where a service cannot be updated yet, Calif recommends one of two JVM options. Set either one in the service's startup arguments or in JAVA_TOOL_OPTIONS, then restart:

  • -XX:-UseBASE64Intrinsics turns off the hardware-accelerated Base64 code for both encoding and decoding. Upwind found it stopped the overflow on every affected build it tested, at the cost of slower Base64.
  • -XX:UseAVX=2 turns off AVX-512 entirely, which also slows cryptography and other vectorized code. Use it only on x86-64 hosts, since Calif warns that OpenJDK on ARM does not recognize the option and fails to start.

Oracle's and OpenJDK's guidance is to apply the update, so treat both options as stopgaps. To confirm that a running JVM picked up an option, check the output of jcmd <PID> VM.flags.

Some early advice circulated -XX:DisableIntrinsic=_base64_decodeBlock instead. It is a diagnostic option, so a JVM that sets it without -XX:+UnlockDiagnosticVMOptions ahead of it fails to start.

At the edge, a WAF or API gateway can reject malformed Basic credentials before they reach the JVM. Equixly suggests this pattern, which matches a value that ends in = at a length that correctly padded Base64 never has:

  • ^Basic\s+(?:\S{4})*\S{0,2}=$

Make the match case-insensitive: as written, the pattern misses basic and BASIC, which Tomcat and Spring Security both accept as the scheme name. JSON Web Tokens are encoded in base64url without padding, so a token containing = is malformed and can be rejected too, after checking that none of your own clients pad their tokens. Cookies, SAML messages and other fields that carry Base64 need their own checks.

Where an internet-facing service can be neither patched nor filtered yet, watchTowr recommends restricting access to it with firewall rules or access lists until a fix is in place.

What a Java4Shell attempt would look like in your logs

No indicators of compromise have been published, so the checks below follow from how the bug works. A hit on the first three can point to an attempt, though each can also have a benign cause. Evidence that an attempt succeeded comes from what the Java process did next, or from what an attacker did with the secrets it held.

Search from November 16, the date Cyber Kendra gives for an advisory on the flaw attributed to South Korea's National Cyber Security Center.

Malformed Base64 in requests. The trigger is a Base64 value that ends in = at a length that is not a multiple of four, which correctly padded Base64 never has. Equixly puts the length at one to three characters past a multiple of 64. A single malformed value can come from a broken client, so repeated values from one source are the stronger lead. Exclude the addresses of any scans or tests your own team or vendors run for this CVE first, since they may send the same values.

Start with Authorization headers. Most web servers do not log those headers, since they carry credentials, so this check depends on a WAF, API gateway or load balancer that records them or the rules they matched. Calif names file uploads as another route to the decoder, and request bodies are rarely logged, so for that route turn to the exception and crash checks below. On a quiet service, the decoder may not be compiled yet: in Upwind's test, the vulnerable code ran only after about 10,000 decodes, so an attacker may send a run of ordinary requests first.

Decoder exceptions in application logs. The decoder rejects the input with an IllegalArgumentException. In Upwind's tests, the message Input byte array has wrong 4-byte ending unit appeared on every attempt, and Semgrep suggests looking for bursts of these exceptions from java.util.Base64$Decoder. Some trigger inputs raise a different message: 129 A characters followed by = gives Last unit does not have enough valid bits, so match any IllegalArgumentException from the decoder rather than one message. Many frameworks catch the exception and reject the request without logging it, so a quiet application log does not rule out an attempt. Spring Security's Basic authentication, for example, drops the decoder's exception and throws a BadCredentialsException reading Failed to decode basic authentication token, which it logs only at debug level.

JVM crashes. Equixly and Upwind found that most stray writes land in free memory and change nothing visible, while a write that corrupts a live object is likely to crash the JVM. HotSpot writes a fatal error log named hs_err_pid<PID>.log in the process's working directory by default, in the system's temporary directory (/tmp on Linux) when it cannot write there, or wherever -XX:ErrorFile points. Equixly warns that the log may not mention Base64, because the crash comes later, when the garbage collector or other code reads the damaged object. The log does record the JVM version and the processor features the JVM identified at startup, which show whether the crashed JVM was an affected build running with AVX-512 VBMI.

In Kubernetes, a restarted container starts with a fresh filesystem, so the fatal error log is usually lost unless it is written to a mounted volume, for example through -XX:ErrorFile. HotSpot also prints the log's header, starting A fatal error has been detected by the Java Runtime Environment, to standard output, where kubectl logs --previous or a log pipeline can find it. The restart itself is still recorded, though the pod's status keeps only the most recent termination and the API server keeps events for one hour by default. A JVM that dies on a fatal error aborts, which, when an init process is PID 1, usually leaves exit code 134 in the container's last state, distinct from the 137 of an out-of-memory kill. A JVM that is itself the container's PID 1 can exit with a different code, so match on the restart rather than on one exit code.

Under systemd, the equivalent is a main process that exited with status=6/ABRT. Line up crash and restart times with the requests the same service received in the minutes before.

Java processes starting shells. If an attempt reached code execution, the attacker's next steps may run inside the Java process itself, with nothing new to see in process telemetry. An in-memory web shell, for example, takes its commands in requests to the service itself, so look in request logs for paths and parameters the service does not normally receive. Where the attacker starts a process, it usually appears as a child of the JVM, so look in EDR or process telemetry for shells, interpreters and download tools started by java, java.exe or javaw.exe. On Windows, a Java service often runs inside a service wrapper such as tomcat9.exe, so match that parent as well.

Some Java applications start shells by design, Jenkins running builds being the obvious example, so compare against each host's own history. Our post on the SharePoint zero-day ran the same parent-child check on w3wp.exe, and our EDR alert investigation guide covers tracing a suspicious process back through its process tree.

Outbound connections and reused secrets. A chain that reads heap memory, as Calif's does, can take private keys and tokens without starting any process. Calif's chain returns the memory it reads in the service's own response, so the theft needs no outbound connection either. Look for outbound connections from the Java process to destinations it has not contacted before, compared with the host's own history, and for the service's credentials or keys being used from unfamiliar addresses.

What to do if a Java4Shell check finds a hit

A crash that lines up with a malformed Base64 request shows an attempt, and leaves open whether it worked. Investigate the host before deciding either way, and pull every request from the same source address, including earlier ones and any sent to your other Java services.

Preserve evidence before patching and restarting the service: the fatal error log, the request logs from the same window and, if the host wrote one, the core dump. If the JVM that received the requests is still running, take a heap dump first, for example with jcmd <PID> GC.heap_dump -all <file>, since anything held only in its memory is gone after a restart. Either dump holds a copy of the heap, so handle it with the same care as the secrets inside it.

Then patch and restart the service, and check the host for follow-on activity: processes started by the old or new JVM, new or changed files in paths the service can write, and new outbound connections. In applications such as Jira, Confluence, Jenkins and Keycloak, also look for admin accounts, API tokens and plugins added after the first suspicious request, since a patch and restart leave them in place. If the investigation cannot rule out success, rotate what the JVM held in memory or could read, including TLS private keys, token signing keys, service credentials and active user sessions. That includes secrets the service could reach beyond the host, such as the credentials a Jenkins controller stores for its builds and cloud role credentials from the host's metadata service. Rotate after removing any foothold the checks found, since an attacker who still has access can read the new secrets too.

Our guide to automated incident response covers the containment steps that follow a confirmed compromise. Patching does not revoke stolen keys or credentials, which stay valid until they are revoked or expire. After rotating, alert on any use of the old credentials or keys: once your own services have switched, a source still using them likely holds a stolen copy. If every check comes back clean, finish the patching: the OpenJDK advisory recommends upgrading as soon as possible, and Calif's two JVM options cover the runtimes that have to wait, wherever you control their startup options.

How Prophet AI Threat Hunter hunts for threats like Java4Shell

Checking for Java4Shell means joining a runtime and processor inventory with request, crash and process data that usually sit in different tools. With AI threat hunting, agents run that search across a team's connected sources, so the team does not have to write each query by hand.

In Prophet AI Threat Hunter, a team can ask for a hunt in plain language, such as JVM crashes since November 16 on hosts running Java. The hunt runs against the telemetry the team has connected. Prophet AI Threat Researcher, an agent inside Prophet AI Threat Hunter, tracks emerging threats against a profile of the organization, including the software it runs, and builds hunts for the critical ones, ready to run or schedule.

Leads go to Prophet AI SOC Analyst for a full investigation, which returns a determination with every query and piece of evidence behind it.

When an investigation confirms a threat, Prophet AI Threat Hunter scopes related activity across the connected sources, including when the attack started. Validated findings can become candidate detections for Prophet AI Detection Engineer, backtested against the team's own history and reviewed as our post on detection engineering in an AI-driven SOC describes.

To run these Java4Shell checks across your environment without writing the queries yourself, see how Prophet AI Threat Hunter handles emerging threats.

What is Java4Shell?

Java4Shell is the name for CVE-2026-114938, a memory corruption flaw in the code Java uses to decode Base64 on x86-64 processors with AVX-512 VBMI. A malformed Base64 string can make the decoder write past the end of its buffer. It affects HotSpot-based Java 17.0.6 and every later release, including 21, 25 and 27, until patched. Calif, which found it, reports remote code execution against several widely used Java applications.

Which Java versions are affected by CVE-2026-114938?

Java 17 from 17.0.6 and every release from Java 18 on, including 21, 25 and 27, are affected in HotSpot-based builds until patched. Oracle's fixed builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, and other vendors use their own version numbers. Standard Java 8 and 11 are not affected, but Oracle lists its Java SE 8 Enterprise Performance Pack and GraalVM for JDK 17 and 21 as affected.

How is Java4Shell different from Log4Shell?

Log4Shell, CVE-2021-44228, was a flaw in the Log4j 2 logging library: logging an attacker's string could make an application load and run code from a remote server. It was exploited widely soon after its December 2021 disclosure. Java4Shell is a memory corruption bug in the Java runtime itself, fixed by updating Java, and it needs an affected build, an AVX-512 VBMI processor and attacker-controlled Base64.

Can Java4Shell be exploited remotely without authentication?

Yes, where an application decodes attacker-supplied Base64 with Java's built-in decoder before checking credentials, as Basic authentication in Spring Security, Tomcat and Jetty 12 does. Calif reports pre-authentication code execution against Jira, Confluence, Jenkins and Keycloak. Exploitation also needs an affected Java build on an x86-64 processor with AVX-512 VBMI, and Calif says each exploit needs heap grooming tuned to the target application.

How can I mitigate Java4Shell if I cannot patch yet?

Calif recommends starting the JVM with -XX:-UseBASE64Intrinsics, which turns off the accelerated Base64 code, or with -XX:UseAVX=2 on x86-64 hosts only, since OpenJDK on ARM fails to start with that option. Both need a restart and cost some performance. Rejecting malformed Base64 in Authorization headers at a WAF or gateway narrows one common pre-authentication path. Oracle and OpenJDK still advise applying the update.

Is Java4Shell being exploited in the wild?

No exploitation in the wild had been reported as of November 17, 2026, CISA had not added CVE-2026-114938 to its Known Exploited Vulnerabilities catalog, and Calif has not released its exploits. Upwind cautions that leaked bugs attract fake exploit code, so treat public proof-of-concept claims with care. JVM crash, restart and request logs from November 16 onward can show attempts, though a clean result does not rule one out.

Table of contents
Add as Google Preferred Sources

Insights

Definitive Guide to Detection Engineering

Where detection engineering falls short, how to close those gaps, and what it looks like in an AI-enabled SOC.

Download Guide
Ajmal Kohgadai

Ajmal Kohgadai

As the Director of Product Marketing at Prophet Security, Ajmal drives marketing and growth strategies and helps security professionals see how AI is transforming security operations.