Java4Shell (CVE-2026-114938): Memory Error in OpenJDK's Base64 Decoder - Find, Secure, and Patch Affected Systems
Java4Shell is a memory error in OpenJDK's Base64 decoder starting with 17.0.6 on x86-64 processors with AVX-512 VBMI. An unauthenticated attacker can crash the JVM and potentially execute code. Oracle, Amazon Corretto, and Eclipse Temurin have provided fixed versions since November 17, 2026; until updating, a JVM startup parameter provides protection.
Java4Shell is a memory error in the Base64 decoder of OpenJDK’s HotSpot JVM. The vulnerability is identified as CVE-2026-114938 and was disclosed by the security firm Calif on November 17, 2026, at the same time as fixes from Oracle and the OpenJDK project. An attacker without credentials sends a Java application a short Base64 string with invalid padding; the JVM then writes beyond the end of a buffer in the Java heap. This makes it easy to trigger a JVM crash. According to Calif, code execution without authentication is also possible in several widely used products. Oracle rates the vulnerability CVSS 3.1 8.1 (high attack complexity), Calif rates it CVSS 4.0 9.2, and Red Hat classifies it as critical.
In short: A system is affected only when three conditions coincide: an OpenJDK-based runtime starting with version 17.0.6 (including 21, 25, and 27), an x86-64 processor with AVX-512 VBMI, and an application that decodes Base64 data from an untrusted source. Java 8 and 11 as well as ARM64 are not affected. As of November 18, 2026, no exploitation is known, and the vulnerability is not in CISA’s KEV catalog. Install your vendor’s fixed runtime; where that is not immediately possible, the startup parameter -XX:-UseBASE64Intrinsics disables the faulty code.
Support with assessment
If you would like to check whether your Java applications are affected, please use the contact form on adeptio.ch.
Cause
On x86-64, HotSpot replaces Base64 decoding by java.util.Base64 with a handwritten machine-code routine (intrinsic) that processes 64 bytes at a time using AVX-512. If the input ends with the padding character =, the routine calculates the length of the final output incorrectly: the value underflows to -1 or -2, the resulting write mask covers all 64 bytes, and the routine writes the entire block rather than a few bytes into the target buffer. In Calif’s example, the write operation starts 48 bytes after the beginning of a 50-byte buffer, with 62 bytes ending up after it in the heap. Only afterward does Java report the input as invalid Base64. By that point, memory has already been overwritten.
The trigger requires only 64 A characters followed by a single =; according to Calif, older OpenJDK 17 releases require 128 A characters. The faulty routine runs only after the JIT compiler has compiled the decoder at its highest tier (C2). This happens after many calls and is normal for a service under load.
Base64 is decoded in many places in Java applications before a user is authenticated: for HTTP Basic authentication, SAML messages, tokens, CSRF values, and MIME-encoded headers. This is why the flaw can be reached without authentication in many products.
Affected and Unaffected Systems
| Criterion | Affected | Not affected |
|---|---|---|
| Runtime | OpenJDK-based builds from 17.0.6 onward as well as 21, 25, and 27 without a fix; Oracle Java SE 8 Enterprise Performance Pack 8u511b33-perf; Oracle GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3; GraalVM Enterprise Edition 21.3.20.0.3 | Java 8 and 11 (standard builds), Java 17.0.0 through 17.0.5 |
| Processor | x86-64 with AVX-512 VBMI: Intel Xeon from Ice Lake onward (including Sapphire Rapids, Emerald Rapids, Granite Rapids), AMD EPYC and Ryzen from Zen 4 onward | ARM64 (e.g., AWS Graviton, Ampere, Apple Silicon); x86-64 without AVX-512 VBMI (e.g., Skylake-SP, Cascade Lake, Zen 2, Zen 3) |
| Application | decodes Base64 from network data using java.util.Base64 | does not process external Base64 data |
The list of distributions includes all builds from the affected branches: Oracle Java SE, Oracle OpenJDK, Eclipse Temurin, Amazon Corretto, Azul Zulu, BellSoft Liberica, SAP SapMachine, Microsoft Build of OpenJDK, and Red Hat Build of OpenJDK. In virtual machines, what matters is whether the hypervisor passes the CPU extension through to the guest.
Many products include their own Java runtime, which does not appear as a Java installation in the software inventory. This applies to container images as well as appliances, including Java-based mail servers and mail gateways. For such products, the respective vendor’s information is authoritative; the product version number alone says nothing about the version of the included runtime.
According to Calif, it has demonstrated unauthenticated code execution in the default configuration of Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, and PingFederate, and authenticated code execution in Apache Kafka, Apache Solr, Elasticsearch, Gerrit, and Spinnaker. Calif is withholding the exploits for these products. A test program that triggers only the memory corruption is publicly available.
Checking Whether a Host Is Affected
On Linux, the following command shows whether the processor reports the four required extensions. The host meets the hardware condition only if all four lines appear.
grep -m1 '^flags' /proc/cpuinfo |
tr ' ' '\n' |
grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
The JVM itself provides the version and effective settings. Use the same java binary that starts the application; for containers, run it in the container.
java -version
java -XX:+PrintFlagsFinal -version 2>/dev/null |
grep -E ' (UseAVX|UseBASE64Intrinsics) '
The faulty code is reachable only if the version falls within the affected range, UseAVX has the value 3, and UseBASE64Intrinsics is set to true. The same command works in PowerShell on Windows:
java -XX:+PrintFlagsFinal -version 2>$null |
Select-String ' (UseAVX|UseBASE64Intrinsics) '
For processes already running, jcmd -l shows process IDs, jcmd <pid> VM.version shows the runtime, and jcmd <pid> VM.flags -all shows the settings. Included runtimes can be found through the release file in the Java directory; it contains the line JAVA_VERSION=.
Fixed Versions
| Vendor | Fixed version | Status as of November 18, 2026 |
|---|---|---|
| Oracle Java SE | 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1; Java 8 Enterprise Performance Pack 8u513-perf | available since November 17 |
| Amazon Corretto | 17.0.21.1.2 | available since November 17 |
| Eclipse Temurin | 17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2, 27.0.1.1+4 | binary packages are being released continuously; container images follow for each version |
| Red Hat Build of OpenJDK (RHEL 8, 9, 10) | no errata yet | Red Hat has announced expedited fixes |
| Keycloak | no fixed image yet | x86-64 images 26.8.2-1 and 26.8.2-2 contain affected OpenJDK 21.0.13 |
| Azul, Microsoft, BellSoft, SAP, Linux distributions | respective November release | check with the vendor |
Oracle’s version numbers cannot be applied to other distributions. For Oracle, 17.0.21.0.3 is the last affected release and 17.0.21.1 is the first fixed release; tools that compare only the first three components classify both as the same. After updating, every Java process must be restarted.
Temporary Mitigation Until the Update
There are two ways to disable the faulty code using a startup parameter. Oracle and the OpenJDK Vulnerability Group do not mention them in their advisories; they originate from Calif and are recommended by Red Hat, Adoptium, and Keycloak.
| Parameter | Effect | Limitation |
|---|---|---|
-XX:-UseBASE64Intrinsics | disables only accelerated Base64 encoding and decoding; all other AVX-512 optimizations remain active | applications with very heavy Base64 processing may be slower |
-XX:UseAVX=2 | disables AVX-512 for the entire JVM | set only on x86-64: OpenJDK on ARM does not recognize the setting and will not start with it |
Red Hat describes -XX:-UseBASE64Intrinsics as the preferred option. How the parameter is set depends on the product. In general, every JVM evaluates the environment variable JAVA_TOOL_OPTIONS; Keycloak uses JAVA_OPTS_APPEND.
export JAVA_TOOL_OPTIONS="-XX:-UseBASE64Intrinsics"
docker run -e JAVA_OPTS_APPEND=-XX:-UseBASE64Intrinsics \
<keycloak-image> start
Existing values of the variables must be retained; append the parameter. For services under systemd, the variable belongs in the unit (Environment=); assigning it in the interactive shell has no effect there. After restarting, the effect can be checked on the running process:
jcmd <pid> VM.flags -all | grep -F UseBASE64Intrinsics
The expected output is bool UseBASE64Intrinsics = false {product} {command line}.
An upstream reverse proxy does not replace this measure. According to OX Security, request buffering in nginx disrupts some attack chains, but not all of them, and length limits do not help with an input of 65 characters. CISA additionally recommends restricting unauthenticated access and watching for unexpected JVM crashes and suspicious Java processes.
Risk Assessment
Assessments differ because crashes and code execution are difficult to achieve to different degrees. A crash can be caused with a single request. According to VulnCheck, executing code requires targeted heap preparation as well as an information leak to bypass ASLR; each application requires its own attack chain. Calif says it built such chains for six products within a few hours, and another researcher reports a working, unpublished exploit.
OX Security estimates that fewer than 0.12 percent of all JVMs are currently realistic targets for code execution. Under this calculation, out of 10,000 Java instances, around 2,200 contain faulty code on affected hardware, 80 can be crashed from the internet by an unauthenticated attacker, and 12 have a realistic risk of code execution. The calculation is based on estimated shares, not measurements.
This results in the following prioritization: first, internet-accessible services with Java-based authentication (identity providers, wikis, ticketing and build systems, artifact repositories); then internal services; and finally clients. Java clients are also affected: according to Calif, a program can be attacked if it establishes a TLS connection to a server controlled by the attacker.
The Federal Office for Cyber Security (BACS) recommends that operators inventory Java applications, including embedded components and externally operated services, clarify exposure with suppliers, and restrict unnecessary external access. CISA calls for immediate patching.
Comments
Comments are loaded from GitHub / Giscus.