Java4Shell (CVE-2026-114938): am I affected? Three checks
Java4Shell is a critical bug in OpenJDK's fast Base64 decoder, patched 17 November 2026. The catch: the same JAR can be vulnerable on one server and safe on the next. Here are the three gates that decide it, how to check each, and what to do.
On 17 November 2026, OpenJDK and Oracle disclosed and patched CVE-2026-114938, nicknamed Java4Shell: a memory-corruption bug in the fast Base64 decoder built into the Java Virtual Machine. OpenJDK scores it 8.1 (CVSS 3.1, attack complexity high); the researchers who reported it, Calif, put it at 9.2 under CVSS 4.0. Either way it is a network-reachable, no-login bug in one of the most widely deployed runtimes on earth.
The name invites a comparison with Log4Shell, and there is one worth making. But the most useful thing to understand about Java4Shell is something the headlines miss: the same application, the same JAR file, can be vulnerable on one server and completely safe on the server next to it. Whether you are exposed depends on three things, and all three have to line up.
Nothing here was scanned, tested or exploited on any machine. This is written from the OpenJDK advisory, Oracle’s Critical Security Patch Update, the vendors’ release notes, the researchers’ public write-up (read for its advisory-level summary only), and the relevant OpenJDK sources and mailing-list history. No exploit code, payload or input is reproduced; the mechanism is described in one sentence and no further.
What the bug is, in one line
To decode Base64 quickly, recent versions of the JVM use a hand-written routine that leans on special CPU instructions. The bug, in plain terms: a malformed, padded Base64 input can make that fast decoder write past the end of its buffer. Java then rejects the input as invalid, but by then neighbouring memory may already be corrupted. With careful, application-specific work an attacker can turn that into a memory leak or remote code execution.
Two things make this surprising. First, Java’s whole reputation is memory safety: the language checks array accesses for you. But the JVM itself is written in C, C++ and, in this spot, assembly, where those checks are your own responsibility. The researchers’ own heading captures the mood: a memory-corruption bug, in Java, in Base64? Second, there is no universal exploit. Every target needs its own bespoke approach, and the researchers are keeping their weaponised, product-specific chains private so defenders can patch first.
The three gates
Think of your exposure as three gates. The bug only reaches you if all three are open. Shut any one and you are not exploitable.
Gate 1 — your Java version
The OpenJDK advisory marks Java 17, 21, 25 and 27. Java 8 and 11 are not marked. The researchers say the affected code reaches back to 17.0.6 on the 17 line. Oracle additionally lists its own Java 8 “performance” build (8u511b33-perf) for its commercial Java SE, so if you run Oracle’s performance build, check Oracle’s advisory specifically.
Run java -version. The fixed builds carry an extra, fourth version segment:
| Line | Example affected build | Fixed build carries |
|---|---|---|
| 17 | 17.0.21 | 17.0.21**.1** |
| 21 | 21.0.13 | 21.0.13**.1** |
| 25 | 25.0.5 | 25.0.5**.1** |
| 27 | 27.0.1 | 27.0.1**.1** |
Vendor status as of 18 November 2026:
- Amazon Corretto — fixed builds released 17 November (17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4).
- Azul Zulu — fixed builds released 17 November (17.0.21.1+2 through 27.0.1.1+4).
- Eclipse Temurin — at the time of writing the Adoptium API still returned the October builds; no fixed Temurin build had been published yet. Check Adoptium before you rely on it.
- Red Hat, Ubuntu, Oracle and others — check your vendor’s own advisory for the fixed package version; I could not confirm their build numbers.
Do not forget your container base images: the Java inside the image is what matters, not the Java on your laptop.
Why the fast code was there at all
A fair question: why ship a hand-written assembly Base64 decoder most apps barely need? Because it is fast. It arrived on the Java 17 line through a backport in November 2022, requested because it decoded large inputs up to about 19× faster. The backport request even noted: “Risk: minimal. This code has been in use for many months, with no bugs reported.” Four years later that same optimisation is the critical bug. It is a neat illustration of shared-runtime risk: a feature a few workloads needed shipped to everyone.
Gate 2 — your CPU (the one most people miss)
This is the gate that makes “the same JAR is safe here and vulnerable there” true. The vulnerable fast path only exists on x86-64 CPUs that support the AVX-512 VBMI instruction set. On a CPU without it, the JVM never even generates that code; on ARM it does not apply at all.
- ARM — AWS Graviton, Apple Silicon, other ARM64: not affected.
- “AVX-512” is not enough. Intel Skylake-SP and Cascade Lake Xeons have AVX-512 but not VBMI — gate shut. Ice Lake and newer Xeons, and AMD Zen 4 and newer (EPYC “Genoa”/“Turin”), have VBMI — gate open. Older AMD such as Zen 3 (“Milan”) has no AVX-512 at all — shut.
Mapped onto common AWS instance families (always confirm with the flag check below, since a VM only sees what the hypervisor exposes):
| Gate 2 shut (not vulnerable on CPU grounds) | Gate 2 open (CPU can be vulnerable) |
|---|---|
| M5 (Skylake-SP / Cascade Lake) | M6i (Ice Lake) |
| M6a (AMD Milan, Zen 3) | M7i (Sapphire Rapids) |
| Graviton — M7g etc. (ARM) | M7a (AMD Genoa, Zen 4) |
| M8a (AMD Turin, Zen 5) |
The practical takeaway: one container image, unchanged, is safe on an m5.large and exposed on an m6i.large. Autoscaling across mixed node pools, or a migration between instance families, can change your exposure without a single deploy.
Don’t trust the instance name — check the CPU flags. On Linux:
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' \
| grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
If all four of avx512f, avx512bw, avx512vbmi and bmi2 are printed, the CPU can run the vulnerable path.
Gate 3 — a hot decoder fed attacker input
The fast routine is only used once the JVM’s optimising JIT compiler has compiled the decoder, which happens after it has run many times. On a busy server handling real traffic, that is normal, not exotic — and an attacker can warm it up with ordinary valid requests first.
And Base64 shows up exactly where untrusted input arrives:
- JWT tokens (RFC 7519 — each part is base64url),
- HTTP Basic-auth headers (RFC 7617 — credentials in Base64),
data:URLs (RFC 2397),- file uploads and other encoded payloads.
The researchers report that ordinary features such as authentication and file uploads can reach the decoder in widely used Java products and frameworks, and that even a Java client connecting to a hostile server can be affected. Gate 3 is the one you cannot easily prove shut, so the safe assumption is that it is open.
Is this the next Log4Shell?
The name begs the question. The honest answer is: it rhymes, but the shape is different.
| Log4Shell (CVE-2021-44228) | Java4Shell (CVE-2026-114938) | |
|---|---|---|
| Lives in | a library (log4j-core) you bundle | the JVM itself |
| CVSS | 10.0 | 8.1 (CVSS 3.1) / 9.2 (CVSS 4.0) |
| Affected hardware | any | x86-64 with AVX-512 VBMI only |
| On CISA’s exploited list | yes | not as of this writing |
| The fix | upgrade a JAR in every app | upgrade the runtime; your JAR doesn’t change |
That last row is the one that changes your checklist. In 2021 you hunted for a dependency inside every application. This time your application artifact is fine — it is the Java runtime underneath it, including the one baked into every container image, that has to move.
What to do
- Patch the runtime. Move to a fixed build (look for that fourth version segment) and rebuild your container images on the patched base. This is the only fix that closes the gate for good.
- If you can’t patch immediately, start the JVM with a mitigation flag:
-XX:-UseBASE64Intrinsicsturns off the accelerated Base64 encode/decode routine, or-XX:UseAVX=2disables AVX-512 entirely. x86-64 only — OpenJDK on ARM does not recognise it and will fail to start. You can pass either throughJAVA_TOOL_OPTIONSwithout editing start scripts.
What the flag costs
The flag gives back exactly what the 2022 backport added: Base64 decode speed. In Intel’s own Base64Decode microbenchmark from the 2021 OpenJDK review, the gain was about 1× for tiny inputs and up to ~19.7× for ~20 KB buffers:
So small tokens (a JWT, a Basic-auth header) barely notice; large Base64 decodes get materially slower. -XX:UseAVX=2 is broader still — it switches off every AVX-512 optimisation, not just Base64. Treat the flag as a stopgap: set it today if you must, patch this week, then drop it.
The one-paragraph version
Java4Shell (CVE-2026-114938) is a critical bug in the JVM’s fast Base64 decoder, patched 17 November 2026. You are only exposed if three gates are all open: an affected, unpatched Java (17/21/25/27, from 17.0.6 on the 17 line); an x86-64 CPU with AVX-512 VBMI (ARM and plain-AVX-512 chips like Cascade Lake are safe); and a hot decoder fed attacker Base64 — which, on a busy server, you should assume. Check your Java version and your CPU flags, patch the runtime and rebuild your images, and use -XX:-UseBASE64Intrinsics as a stopgap if you can’t patch yet.
Sources
- OpenJDK Vulnerability Advisory, 2026-11-17 — https://openjdk.org/groups/vulnerability/advisories/2026-11-17 (CVE-2026-114938, hotspot/compiler, CVSS 3.1 8.1; affects 17/21/25/27).
- Oracle Critical Security Patch Update, November 2026 — https://www.oracle.com/security-alerts/cspunov2026.html (affected Oracle Java SE builds).
- Calif, “Java4Shell” — https://calif.io/java4shell/ (CVSS 4.0 9.2; 17.0.6+; AVX-512 VBMI requirement; ARM64 not affected; mitigation flags). Read for its advisory-level summary; exploit detail is not reproduced here.
- Amazon Corretto release notes (17/21/25/27), November 2026; Azul Zulu release notes, November 2026 — fixed build numbers.
- Eclipse Adoptium (Temurin) — https://adoptium.net/ (status checked 18 Nov 2026).
- OpenJDK review and backport of the AVX-512 Base64 decode intrinsic (JDK-8268276), OpenJDK mailing lists, 2021 and November 2022 — the ~19× figure and the backport risk note.
- Oracle
javacommand documentation, JDK 21 (-XX:UseAVX,-XX:+UseBASE64Intrinsics,JAVA_TOOL_OPTIONS). - RFC 7519 (JWT), RFC 7617 (HTTP Basic auth), RFC 2397 (
data:URLs), RFC 4648 (Base64). - Log4Shell for comparison: NVD CVE-2021-44228 (CVSS 10.0), Apache Logging security page, CISA Known Exploited Vulnerabilities catalog.
- AVX-512 CPU support: Wikipedia “AVX-512” (secondary); AMD EPYC generation names as reported by Tom’s Hardware; AWS EC2 instance-type pages for processor families.