A critical memory-corruption vulnerability in Java, known as Java4Shell (CVE-2026-114938), affects the Base64 decoder inside the HotSpot Java Virtual Machine on certain x86-64 systems. Specially crafted Base64 data can crash the JVM or allow unauthenticated remote code execution. Oracle and OpenJDK released fixes on 17 November 2026 as part of the November Critical Security Patch Update. This guide shows you how to find every Java runtime in your environment, confirm whether it is affected, apply the permanent fix, and put temporary controls in place if you cannot patch immediately.
Java powers a large share of enterprise applications, identity systems, build servers, and middleware. Because many of those applications accept Base64 data before any login (HTTP Basic authentication, JWTs, SAML, cookies, or file uploads), the flaw is reachable from the network on internet-facing systems. Standard Java 8 and Java 11 are not affected; the problem starts with OpenJDK 17.0.6 and later on processors that support AVX-512 VBMI instructions. ARM systems are not vulnerable to this specific issue.
What You Need
- Administrative access to servers, containers, or workstations that run Java
- Ability to restart Java processes after an update
- A list of your Java distributions (Oracle Java SE, Amazon Corretto, Eclipse Temurin, Azul Zulu, Red Hat, Microsoft Build of OpenJDK, or vendor-bundled runtimes)
- A maintenance window for internet-facing systems
- Basic familiarity with the command line (the commands below work on Linux and macOS; Windows equivalents are noted where needed)
Step-by-Step Guide
Step 1: Inventory every Java installation
Java often hides inside application folders, Docker images, and appliances. Start with a complete search so nothing is missed.
# Show the default Java version
java -version
# Find all java executables on Linux/macOS
sudo find / -type f -name java -executable 2>/dev/null
# On Windows (PowerShell)
Get-ChildItem -Path C:\ -Recurse -Filter java.exe -ErrorAction SilentlyContinue
Also check container images, CI runners, and third-party software such as Jenkins, Jira, Confluence, Keycloak, or Elasticsearch. Note the full version string for each installation. A process that is still running an old JVM remains vulnerable even after you install a new package.
Step 2: Determine whether the system is affected
You are exposed only when both conditions are true: the Java version is in the affected range and the CPU supports AVX-512 VBMI.
# Check CPU flags on Linux
lscpu | grep -E 'avx512f|avx512bw|avx512vbmi|bmi2'
# Or simply
grep -o 'avx512vbmi' /proc/cpuinfo | head -1
Affected version ranges include OpenJDK/Oracle Java 17 from 17.0.6 through 17.0.21, Java 21 up to 21.0.13, Java 25 up to 25.0.5, Java 27 up to 27.0.1, and certain Oracle Java 8 Enterprise Performance Pack builds. Fixed builds from the November 2026 update are 17.0.21.1, 21.0.13.1, 25.0.5.1, and 27.0.1.1 (exact build numbers vary slightly by vendor). Ifavx512vbmidoes not appear, the optimized Base64 path cannot run and this particular flaw does not apply.
Step 3: Apply the permanent fix
Updating the Java runtime is the only complete remediation. Download the fixed build from your vendor or distribution and install it.
- Oracle Java SE: Install the November 2026 Critical Security Patch Update builds (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or the corresponding Java 8 performance-pack update).
- Amazon Corretto: Use the 17.0.21.1.x / 21.0.13.1.x / 25.0.5.1.x / 27.0.1.1.x series.
- Eclipse Temurin, Azul Zulu, Microsoft Build of OpenJDK: Install the matching fixed release published after 17 November 2026.
- Linux packages: Update through your package manager once the distribution has released the fixed packages, then verify the version.
# Example after installing a new JDK on Linux
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
java -version
# Confirm the new version is active
$JAVA_HOME/bin/java -version
For Docker images, rebuild or pull an updated base image that contains a fixed JDK, then redeploy. Bundled JREs inside commercial applications must be replaced by the vendor’s patched release or by substituting the runtime yourself after testing.
Step 4: Apply a temporary mitigation if you cannot patch today
If a full update must wait, disable the vulnerable code path with a JVM flag. This is not a permanent solution; remove the flag once the fixed runtime is running.
# Add to the Java startup command or JAVA_OPTS
-XX:-UseBASE64Intrinsics
# Alternative on x86-64 systems
-XX:UseAVX=2
Also enforce input-size limits and validate Base64 data at the application edge, and restrict unauthenticated access to internet-facing Java services. Test the flag in a non-production environment first because it can affect performance of Base64-heavy workloads.
Step 5: Restart every affected JVM
A patched package does not protect a process that is still running the old code. Restart application servers, containers, and background services after the update.
# Example for a systemd service
sudo systemctl restart my-java-app
# Docker
docker compose up -d --force-recreate
Prioritize internet-facing systems. Keep a short maintenance window and verify the service comes back healthy before moving to the next host.
Step 6: Verify the fix
Confirm both the version and that the process is using the new runtime.
java -version
# Look for 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or later vendor builds
# Check running processes (Linux)
ps aux | grep java
jps -v
If you used the temporary flag, confirm it appears in the process arguments. Monitor application logs for unexpected crashes during the first hours after the restart.
Common Mistakes
- Updating only the system Java package while leaving vendor-bundled JREs inside applications or container images untouched.
- Installing the fixed JDK but forgetting to restart the running JVM, so the old code remains in memory.
- Assuming ARM or older x86-64 CPUs without AVX-512 VBMI are affected (they are not for this specific flaw).
- Treating the JVM flag as a permanent fix instead of a short-term bridge.
- Skipping inventory of development workstations, CI agents, and appliances that also run Java.
- Applying the update without testing, then discovering application incompatibilities during the production restart.
Final Check
After the update, every internet-facing Java service should show a fixed version string and should have been restarted. Spot-check a few internal systems as well. If any service still reports an affected version, schedule an immediate follow-up. Keep the temporary flag only until the permanent patch is confirmed live.
Prevention Tips
- Maintain an accurate inventory of every JDK and JRE, including those embedded in containers and third-party software.
- Subscribe to vendor security advisories and the OpenJDK vulnerability list so future Critical Security Patch Updates are applied within days, not weeks.
- Use automated patching or configuration-management tools to keep Java runtimes current across the fleet.
- Limit network exposure of Java services and enforce authentication before Base64-heavy endpoints where possible.
- Include Java version checks in your regular vulnerability scanning and container image scanning pipelines.
Summary
Java4Shell (CVE-2026-114938) is a serious memory-corruption flaw in the HotSpot Base64 decoder that can lead to crashes or unauthenticated remote code execution on affected x86-64 systems running Java 17 and later. The permanent solution is to install the fixed builds released in the November 2026 Critical Security Patch Update (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and equivalent vendor releases) and restart every JVM. Until that is complete, the flags-XX:-UseBASE64Intrinsicsor-XX:UseAVX=2provide a temporary mitigation. Inventory thoroughly, prioritize internet-facing systems, verify the new versions, and treat regular Java patching as a standing operational practice. Once these steps are finished, your systems are protected against this specific vulnerability and better prepared for the next one.

