Java4Shell: A Critical Java Vulnerability Hiding in Plain Sight

Java4Shell turns malformed Base64 into remote code execution in Jenkins, Jira, Keycloak and more. Check your Java runtimes and CPUs, then patch.

November 17th, 2026

Java has been around for more than 30 years, running everything from enterprise authentication systems to build servers, application platforms, and infrastructure that most organizations can’t operate without. You would think that after three decades, something as basic as decoding Base64 would be pretty well understood. Apparently, there are still a few surprises left.

Security researchers at Calif have discovered Java4Shell (CVE-2026-114938), a critical memory-corruption vulnerability in OpenJDK's Base64 decoder. A specially-crafted Base64 input can trigger remote code execution in vulnerable Java applications, which has resulted in a critical CVSS 4.0 score of 9.2. This isn't a problem with some obscure third-party library that nobody remembers installing. The vulnerability exists in Java's standard library, which means the potential exposure extends across a substantial portion of the enterprise software ecosystem.

The Problem Is Deeper Than the Application

Base64 encoding is an almost universally-used encoding technique for turning binary data into text. If you’re building any kind of system that’s transferring data, you’ll be using Base64, even if it’s buried in a library somewhere. HTTP authentication headers use it, SAML implementations use it, and applications rely on it for tokens, attachments, and various other data formats. Java provides a built-in decoder through java.util.Base64.Decoder, so developers generally have little reason to implement their own.

Normally, this is exactly what you want. Using the standard library is preferable to reinventing functionality that has already been tested and maintained. But when the standard library itself contains a vulnerability, the consequences can extend well beyond any individual application.

According to Calif's research, malformed Base64 input can trigger memory corruption in certain OpenJDK implementations, potentially leading to remote code execution. More concerning, the researchers report demonstrating pre-authentication exploitation against several widely deployed Java applications running in their default configurations. 

That means an attacker may not need valid credentials to exploit an affected system, making this considerably more urgent than a vulnerability that requires an authenticated user. But there is a slight catch when it comes to who is actually vulnerable.

Who Is Vulnerable?

The vulnerability affects OpenJDK Java 17.0.6 and later (that’s every OpenJDK since 2021!) across distributions including Oracle OpenJDK, Oracle Java SE (such as versions 8u511b33-perf, 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3, and 27.0.1.0.3), Oracle GraalVM for JDK, Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, and Red Hat OpenJDK. However, there's an important qualification: the system must be running on an x86-64 processor with AVX-512 VBMI support, whereas native ARM64 JVMs are not affected. That hardware requirement narrows the affected population, although not nearly as much as you might hope.

Modern Intel Xeon and AMD EPYC processors are common throughout enterprise data centers and cloud infrastructure. Many AWS, Azure, and Google Cloud instance families use processors from the affected families, meaning that any organizations running Java workload in the cloud are just as likely to be affected as on-prem.

This means that two organizations running the same Java application and Java version might have different exposure depending on the underlying hardware. Native ARM64 JVMs are not affected, but for organizations running x86-64 infrastructure, identifying vulnerable systems requires more than simply searching for a particular Java version. They need to understand the relationship between the Java runtime, processor architecture, and application processing the input, which is a level of visibility many organizations don't currently maintain.

If you have shell access, you can get this information using various command line tools. For Linux: lscpu | grep -i avx512 and grep -o avx512 /proc/cpuinfo | head -n 1. On Windows you can install coreinfo from Microsoft and run coreinfo.exe -f. For Kubernetes, you can look for feature.node.kubernetes.io/cpu-cpuid.AVX512VBMI: "true" in your node selection. For docker, AVX isn’t explicitly declared, and we recommend using the Linux command above. Our advice if you are using an affected version is simply to update it, regardless of CPU architecture, as it is difficult to know if you are affected.

The Application List Should Get Your Attention

Calif's initial testing demonstrated remote code execution against several recognizable enterprise applications and we confirmed an out-of-bounds heap write from the code. The affected applications include pre-authentication exploitation of Atlassian Confluence and Jira, JFrog Artifactory, Jenkins, Keycloak, PingFederate, and certain Spring Boot applications. The researchers also reported post-authentication exploitation against Apache Kafka Broker, Elasticsearch, and Gerrit.

These aren't obscure applications sitting in forgotten corners of the network. They're central components of development pipelines, identity infrastructure, artifact management, and enterprise operations. Consider Jenkins or Artifactory, where a compromise could potentially provide access to source code, build infrastructure, credentials, and software distribution systems. Keycloak and PingFederate are equally concerning, because identity services often occupy privileged positions within an organization's architecture and are publicly accessible.

A vulnerability that begins with malformed Base64 input could become a much larger incident if the compromised application has access to sensitive resources. It's also worth emphasizing that Calif's list is not exhaustive, and the researchers expect additional Java applications running on affected hardware to be vulnerable.

That doesn't mean every deployment of these applications is automatically exploitable. Runtime versions, hardware capabilities, application configuration, and reachable input paths all matter when determining actual exposure.

What Defenders Should Do Right Now

For Semgrep customers we have updated our existing Detect-2Shell workflow to easily check if your repositories may be vulnerable. See Run Agentic Workflows for instructions in the docs.

Java results are the issues whose titles start with Java runtime exposure candidate. To see only those, filter Detect-2shell issues by that title. You can do this on the Workflows page, via the MCP, or with the Issues API’s titleQuery filter.

For those running agentic security programs, we have produced a runbook-style prompt for use with your preferred harness. You will need to grant an agent at least read-only infrastructure access, but this will produce an in-depth report which should allow you to quickly determine exposure.

Assess whether the Java runtimes in the infrastructure available to you are affected by CVE-2026-114938, an out-of-bounds write in the OpenJDK HotSpot AVX-512 Base64 decoder. Perform a read-only assessment within your authorized access, using your own commands; there is no tool to download. Do not send malformed Base64 or any exploit payload to a service, do not run proof-of-concept code, do not attach to or signal running JVMs (no jcmd, jstack or agents), and do not change systems. The only Java commands needed are short "-version" style invocations of each runtime's own java binary. 1. Verify the current advisory at https://calif.io/java4shell, along with any superseding advisories from OpenJDK and from your Java vendors (Oracle, Eclipse Temurin, Amazon Corretto, Red Hat, Azul, Microsoft, BellSoft, SAP, GraalVM) and your operating-system or platform provider. Establish affected and fixed releases per vendor, including backports. Cite sources and retrieval dates; flag anything you cannot verify. Known at publication: HotSpot-based Java 17.0.6 and later, and every release from 18 up, are affected; Java 8, 11 and 17.0.0 to 17.0.5 are not; no fixed builds had shipped. 2. Inventory Java across accessible hosts, containers, Kubernetes workloads, images, build agents and managed platforms. Include runtimes bundled inside products (for example Jenkins, Elasticsearch, Kafka, Keycloak, Jira, Confluence, IDEs and desktop tools) and trimmed jlink runtimes: search for the JVM library itself (libjvm.so, jvm.dll, libjvm.dylib), not only the java on the PATH. Find running JVMs by what they have loaded, not only by name: a product with its own launcher runs a JVM without any process called java, so also look for processes that have the JVM library loaded (on Linux, /proc//maps; on Windows, the loaded modules). Look inside every container; for an image with no shell, use the image and container configuration (entrypoint, command, environment) and invoke its java directly. Record the service, environment, owner where known, vendor, exact version and image digest or build identity. Distinguish running processes from installed but unused runtimes and from repository declarations. If updates were installed, verify that running processes and replicas were restarted onto the updated build. 3. For each running JVM, collect the options it was really started with, from the process and not from your shell. The JVM applies them in this order, and a later one wins: JAVA_TOOL_OPTIONS, then JDK_JAVA_OPTIONS and the command line, then JAVAOPTIONS. Include any file they name (@argfiles, -XX:Flags=, -XX:VMOptionsFile=) and the product's own options file (jvm.options, .vmoptions, setenv scripts, service or unit definitions). On Linux, read /proc//cmdline and /proc//environ; another user's process needs root, and inside a container even root may have to run as that process's user. A shell opened in a container (docker exec, kubectl exec) does not inherit the service's command-line options. On Windows, another process's environment cannot be read without attaching: use the service or launcher configuration and the machine and user variables, and say that you did. If an options source exists but cannot be read, report unknown instead of assuming defaults. 4. Decide applicability for each JVM. It is affected only when all of these hold: the VM is HotSpot (GraalVM with the Graal JIT counts; Eclipse OpenJ9 and IBM J9 do not); the version is in an affected range, compared numerically (17.0.10 is newer than 17.0.6) and not documented as fixed by its vendor; the architecture is x86-64; the CPU, as that JVM sees it, has both avx512_vbmi and avx512bw; and the process runs with UseAVX=3, UseBASE64Intrinsics=true and the C2 JIT compiler enabled. Establish each fact with that runtime's own java, on the node where the workload really runs (the same image can be affected on one node and not on another). Version and VM type: "java -version". CPU features: "java -Xlog:os+cpu=info -version" with no other options and with the three Java option variables cleared for that command, because a setting such as UseAVX=2 hides the features. Effective flags: "java -XX:+PrintFlagsFinal -version", passing only the collected options that can change these flags (UseAVX, UseBASE64Intrinsics, -Xint, TieredStopAtLevel, TieredCompilation, CompilationMode, DisableIntrinsic, ControlIntrinsic and the Unlock options they need) and never heap sizes, agents or system properties, so the check cannot reserve a service-sized heap. C2 is off when the version banner says "interpreted mode", TieredStopAtLevel is below 4, or CompilationMode is quick-only. A runtime with a JVM library but no java binary cannot be asked: read the version from its release file and report unknown if it is in an affected range. If any fact cannot be read, report unknown. 5. Report mitigation status separately from patch status. A JVM started with -XX:-UseBASE64Intrinsics or with UseAVX at 2 or lower is mitigated, not fixed. Verify that the setting reached the running process, not just a configuration file: a container must be recreated, not restarted, to pick up a new environment variable. Flag any use of -XX:UseAVX=2 in configuration shared with ARM systems, because an ARM JVM refuses to start with it. A JVM running with the JIT compiler off is not triggerable, but do not recommend that as a mitigation. 6. Report exposure and compensating controls separately from runtime status. Identify where untrusted data can reach Java's built-in Base64 basic or URL decoder, including through frameworks and libraries (HTTP Basic authentication, CSRF tokens, JWT, SAML and similar), and whether each path is Internet-facing and reachable before authentication. Use this to prioritize, not to clear: the absence of a decode call in your own code does not establish that none is reachable. Dependency scanners will not report this issue, because it is in the Java runtime and not in a library. A WAF rule, a lack of alerts or a lack of crashes does not prove that a runtime is patched or that no attempt occurred. Where logs are accessible, note unexplained JVM crashes (hs_err_pid files) and bursts of IllegalArgumentException from java.util.Base64$Decoder as indicators to review, not as proof. Return a concise summary and a table: asset/service | runtime vendor, version and build | CPU class | effective flags and where each was set | assessment (affected, mitigated, fixed, not applicable, or unknown) | exposure | supporting evidence | next action. Quote the command output each assessment rests on. Prioritize affected Internet-facing services. List unassessed systems and the exact evidence or access needed to resolve unknowns. For each affected service, propose the exact mitigation line (prefer JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics), the file or setting it belongs in, and the steps to verify it, without applying changes. Link to current vendor remediation guidance. Do not conclude that the entire infrastructure is unaffected unless the assessed scope supports that conclusion.

Calif has identified an interim mitigation. On affected x86-64 systems, starting the JVM with -XX:UseAVX=2 disables AVX-512 support and prevents the JVM from using the affected execution path described in the advisory. However, we strongly recommend patching to the latest OpenJDK, even if you are not using the affected hardware, due to the challenge of determining exposure. Defenders should focus on four priorities:

  1. Inventory Java runtimes. Include vendor products, container images, build infrastructure, and appliances with embedded JVMs.

  2. Identify the underlying hardware. Determine whether AVX-512 VBMI capabilities are exposed to the JVM.

  3. Prioritize exposed systems. Internet-facing applications, authentication services, development infrastructure, and business-critical systems deserve immediate attention.

  4. Patch. Arrange change windows, prepare to rebuild containers, and restart affected services once appropriate updates become available. For commercial products that bundle Java, follow the vendor's supported update process rather than assuming a standalone Java update will fix the application.

 Should You Hunt for Exploitation?

Patching or applying the interim mitigation should come first. Detection is a poor substitute for either, because exploitation depends on how each application receives and decodes Base64, and a memory-corruption exploit may leave little behind.

If you do have time to look, two indicators are worth reviewing: unexplained JVM crashes (hs_err_pid files) and bursts of IllegalArgumentException from java.util.Base64$Decoder in application logs. Neither is proof of compromise. And the absence of either, or of WAF alerts, does not show that a system is patched or hasn’t been attacked. If you can’t confirm what you’re running, treat it as exposed until you’ve updated or mitigated.

The Bigger Lesson

Java4Shell reminds us that software security doesn't end when application code passes its security checks. We spend considerable time worrying about vulnerable dependencies, insecure application logic, and increasingly, AI-generated code. Those are legitimate concerns, but the software underneath our applications deserves just as much attention.

A trusted standard library is still code, a mature runtime can still contain serious vulnerabilities, and an otherwise secure application can become exploitable because of something happening several layers below its own logic.

The answer isn't to stop using Java or start writing your own Base64 decoder, which would probably make things worse. It's to understand what you're running, where you're running it, and how quickly you can respond when something underneath your application turns out to be vulnerable.

If you can't identify which applications are running affected JVMs on affected processors, you have a bigger problem than this particular vulnerability. You just happened to discover it because someone found a bug in Base64 decoding.