Java4Shell / Java2Shell (CVE-2026-114938): Am I affected?
- What: critical flaw in Java's Base64 decoder (CVE-2026-114938, "Java4Shell", called "Java2Shell" in the first reports). CVSS 9.2 according to the finder, Oracle rates it 8.1.
- Affected: Java 17 (from 17.0.6), 21, 25 and 27 – but only on x86-64 servers with AVX-512 VBMI (Intel Ice Lake or newer, AMD Zen 4 or newer).
- Not affected: standard Java 8 and 11, ARM servers, OpenJ9.
- Safe from: 17.0.21.1 · 21.0.13.1 · 25.0.5.1 · 27.0.1.1 (or your vendor's patched package). Restart all Java processes afterwards.
- Status: as of 19 Nov 2026 no attacks are known; the flaw is not on CISA's list.
What is Java4Shell?
On 17 November 2026 Oracle released out-of-band Java updates. They fix a memory error in the accelerated Base64 decoder of the Java runtime (HotSpot): a crafted Base64 string makes the decoder write past the end of its buffer. Calif, the security firm that found the bug, used it to read memory and run code – without logging in.
This is delicate because Base64 is almost everywhere: in HTTP login ("Basic auth"), in login tokens (JWT) and in file uploads. Many applications decode this data before they check the credentials. The bug has been in the code since Java 17.0.6 (January 2023).
About the name: the first reports on 17 Nov called the flaw "Java2Shell"; "Java4Shell" has since become the common name. Both refer to the same vulnerability, CVE-2026-114938.
Who is affected?
A system is only exploitable if all conditions are met:
- Java version: 17.0.6 or newer, 21, 25 or 27 – from any vendor (Oracle, Eclipse Temurin, Amazon Corretto, Azul Zulu, SapMachine …).
- Processor: x86-64 with AVX-512 VBMI – Intel Xeon Ice Lake or newer, AMD Zen 4 or newer. Older Xeons (Skylake-SP, Cascade Lake), AVX2-only processors and ARM servers are not affected.
- Input: the application decodes Base64 from untrusted sources (login headers, tokens, uploads).
Calif demonstrated code execution without login in the default configuration of Jenkins, Jira, Confluence, Keycloak, JFrog Artifactory and PingFederate; with login for Elasticsearch, Apache Kafka and Gerrit, among others. The list is not complete – in principle any Java application can be affected, including Tomcat, Jetty, WildFly and Spring Boot applications.
Affected and patched versions
| Java branch | Vulnerable | Safe from |
|---|---|---|
| Java 27 | up to 27.0.1 | 27.0.1.1 |
| Java 25 (LTS) | up to 25.0.5 | 25.0.5.1 |
| Java 21 (LTS) | up to 21.0.13 | 21.0.13.1 |
| Java 17 (LTS) | 17.0.6 to 17.0.21 | 17.0.21.1 |
| Java 18–20, 22–24, 26 | all versions | – (no fix, move to an LTS branch) |
| Java 8 and 11 | not affected (exception: Oracle "Enterprise Performance Pack" for Java 8, safe from 8u513-perf) | |
Vendor status (18 Nov): Oracle, Amazon Corretto and SapMachine have published fixed versions, Amazon Linux ships patched packages. Eclipse Temurin, Azul Zulu and BellSoft Liberica releases are rolling out. Red Hat, Ubuntu and Debian had no patched packages yet at that time – apply the interim mitigation below until they do. Important: many products (e.g. Jenkins, Jira or Elasticsearch packages and Docker images) bundle their own Java – updating the system package alone is then not enough.
How to check whether you are affected
1. Java version
java -version # the system's default Java
jcmd -l # running Java processes
jcmd <PID> VM.version # version of a specific process (including bundled Java)
docker exec <container> java -version
2. Processor
# Linux: if this prints a line, the CPU supports AVX-512 VBMI
grep -m1 -o avx512vbmi /proc/cpuinfo
# Windows (PowerShell): processor name – Intel Xeon Ice Lake or newer / AMD Zen 4 or newer are affected
(Get-CimInstance Win32_Processor).Name
For virtual machines the host's processor counts if it is passed through to the VM.
3. From outside with PHPCheck.net
The Java version cannot be determined from outside. The in-depth check and the LAN check do however detect typical Java applications (Jenkins, Jira, Confluence, Keycloak, Artifactory, Tomcat, Jetty, WildFly, Spring Boot, Elasticsearch) and then point to Java4Shell – a good way to find forgotten systems in your own network.
Immediate actions
- Update to 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or your vendor's patched package – including the Java bundled in applications and containers.
- Restart all Java processes (services, containers, cluster nodes). A new file on disk does not protect a running process.
- Order: internet-facing systems and the products named above first, then the rest.
Interim mitigations if you cannot update yet
Both options prevent exploitation but may cost some performance. They are set when the JVM starts (e.g. via JAVA_OPTS or
JAVA_TOOL_OPTIONS) and only take effect after a restart:
-XX:-UseBASE64Intrinsics # disables only the accelerated Base64 decoder
-XX:UseAVX=2 # disables AVX-512 (x86-64 only – on ARM the JVM will not start with it)
Detecting attacks
- JVM crashes:
hs_err_pid*.logfiles dated November 2026 or later in the application's working directory. - Application logs: clusters of Base64 errors such as
Input byte array has wrong 4-byte ending unit. - Processes: unexpected child processes of Java (shells,
curl,wget).
find / -name "hs_err_pid*.log" -newermt "2026-11-01" 2>/dev/null
grep -R "wrong 4-byte ending unit" /var/log/ 2>/dev/null | tail
Run these checks before restarting – a restart clears evidence in memory. Be careful with "scanners" and check scripts from unknown GitHub repositories: some download unverified code or give false all-clears.
Assessment
Public sample code so far only triggers the memory error or a JVM crash; working code execution has not yet been reproduced publicly outside Calif. The attack has to be tailored to each application – there is no universal exploit. Still: update promptly, because the affected products are exactly the systems that hold credentials, source code and build pipelines.
For comparison with October's PHP flaw: PHP2Shell. All updates of the month: Security updates November 2026.
Sources
- JFrog Security Research: Java4Shell (CVE-2026-114938)
- Sweet Security: Which Java workloads are at risk
- PenTestIT: Exposure, Fixes and Detection
- java2shell.io: Patch Guide
More guides
- PHP security release of 19 Nov 2026: 8.5.13, 8.4.28, 8.3.37, 8.2.36 – who is affected?
- Security updates November 2026: Apache 2.4.71 (HTTP/2), WordPress 7.1.4, Exchange, OpenSSL
- PHP2Shell (CVE-2026-109618 / CVE-2026-109619): Am I affected?
- WordPress flaw CVE-2026-119977: why the update itself is risky – and how to update to 7.1.4 safely