Java4Shell (CVE-2026-114938): the AI-found bug, explained
APJ-RAISE team · · 7 min read
Java4Shell (CVE-2026-114938) is a memory corruption bug in the fast Base64 decoder of OpenJDK, and the fix is a Java update released on 17 November 2026. It only bites on x86-64 chips with AVX-512 VBMI, running OpenJDK 17.0.6 or later.

Most stories stop at "patch now". That advice is right. But the bug is also a neat lesson in why the fastest code inside a runtime is the hardest code to test, and why an AI model spotted something years of normal testing missed. This page covers both, as of 18 November 2026.
Am I affected by the Java4Shell vulnerability?
You are at risk only if all three of these are true for a machine:
- Java line: you run Java 17 (17.0.6 or later), 21, 25 or 27. Oracle also lists its Java 8 Performance Pack.
- CPU: the machine is x86-64 and the chip supports AVX-512 VBMI.
- Input: some app on it decodes Base64 that comes from outside.
The third point is almost always true for a server. Logins, tokens and uploads all use Base64. So in practice the CPU and the Java version decide it. ARM64 machines, such as Apple Silicon Macs and AWS Graviton servers, are not affected, says Calif. Standard Java 8 and Java 11 are not on the affected list.
On Linux you can check the CPU flag yourself: look for avx512vbmi in the flags line of /proc/cpuinfo. If it is missing, the vulnerable fast path never runs on that box. Still patch, because a VM can move to newer hardware later.
How does an integer sign error become an out-of-bounds write?
Java4Shell starts with a small maths mistake. Calif says the decoder gets the output length wrong for some inputs near the end of the data, and the number comes out negative. The code then writes 64 bytes past the end of its buffer.
You do not need to read assembly to follow the idea. Picture the decoder doing this, in plain words:
- 1It works out how many bytes of space are left in the output buffer.
- 2It asks: is the space left smaller than one full block? If yes, it should slow down and finish byte by byte.
- 3For certain inputs, the first sum goes below zero. A negative "space left" can slip past a check that was written with only positive numbers in mind.
- 4The decoder believes it is safe and stores a full block anyway. The block lands in memory that belongs to something else.
Why exactly 64 bytes? An AVX-512 register is 512 bits wide, and 512 ÷ 8 = 64 bytes. The fast decoder writes one full register at a time, so a single wrong store spills one register's worth of data. That number in the advisory is a direct clue to how the code works.
This is also why "Java is memory safe" did not help. The safety checks live in the Java language. An intrinsic is hand-written machine code that the JVM swaps in for a Java method, so it runs below those checks.
Why are JIT intrinsics so hard to test?
JIT intrinsics are hard to test because the bug only exists on certain chips, with certain input lengths, after the JIT decides the method is hot. Normal unit tests often miss all three conditions at once.
Think about what a test run would need to hit this bug:
- Right hardware: CI machines without AVX-512 VBMI never run this path. The plain Java fallback passes every test.
- Warm code: the JVM only switches to the intrinsic after a method runs many times. A short test may finish before that.
- Odd lengths: the error sits at the tail of some inputs. Random fuzzing tends to spend its time on the middle cases.
The bug was old enough to matter. OpenJDK 17.0.6 shipped in January 2023, so vulnerable builds have been in use for nearly four years. We think the honest research question is not "why did nobody notice", but how to make tests run the fast path on purpose. Differential testing is one answer: run the same inputs through the intrinsic and the slow Java version, and flag any difference.
How did AI find Java4Shell?
Calif says an AI coding agent flagged the bug. Researcher Quang Luong wrote that OpenAI's Codex pointed him to a memory corruption inside the Base64 decoder. A working exploit took about two more hours, and Calif puts the total token bill under $200.
Put those numbers next to each other. Under $200 and a few hours bought a critical bug in a runtime that sits under Jira, Jenkins and Keycloak. Even if a human expert did the same work, the time and salary would cost far more. That price gap is the real story for defenders. We saw the same pattern in OpenAI's Linux kernel exploits, and attackers are already pairing AI with tools like ARTEX.
Note what the AI did not do alone. Humans at Calif checked the finding, judged the impact and wrote the disclosure. The model found the thread; people pulled it.
What most Java4Shell coverage gets wrong
Three points get blurred in many reports:
- Two scores: Calif gives 9.2 under CVSS 4.0. Oracle gives 8.1 under CVSS 3.1, per Tenable. These use different scales, so the gap is not a dispute.
- Hardware gate: "all Java servers are exposed" is wrong. No AVX-512 VBMI means no fast path, and ARM64 is safe.
- Not Log4Shell 2: Log4Shell (CVE-2021-44228) was a library bug, attacked before many fixes landed. Java4Shell is in the runtime and had no reported attacks before the patch.
Calif showed pre-auth remote code execution on default installs of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate, The Hacker News reported. Calif published only a small trigger test and kept its app exploits private. Tenable said on 17 November it knew of no attacks in the wild, and the bug was not in CISA's KEV list on 18 November. Tenable also reports that Kevin Breen of Immersive built his own private exploit, so public ones may not be far away.
Java4Shell fix: a patch checklist with reasons
Oracle's fixed builds, as listed by Tenable:
- Java 17: 17.0.21.1
- Java 21: 21.0.13.1
- Java 25: 25.0.5.1
- Java 27: 27.0.1.1
- Java 8 Perf Pack: 8u513-perf
Temurin, Corretto, Zulu, Red Hat and Microsoft builds use their own numbers, so check your vendor page. Then work through this list:
- 1Find every runtime, including copies inside Docker images and apps like Jenkins. Bundled Java is the copy people forget.
- 2Patch internet-facing x86-64 servers first, since remote input is the attack path.
- 3Restart each app after the update. A running JVM keeps the old code in memory until it restarts.
- 4If you cannot patch today, Calif suggests the flag -XX:-UseBASE64Intrinsics, or -XX:UseAVX=2. Both turn off the fast path, so test the speed cost first.
- 5Treat a WAF rule as a stopgap only. Cloudflare has published WAF protection for Java4Shell, but the bug lives in the runtime.
- 6Watch for JVM crashes. A failed attempt to corrupt memory often ends in a crash, so a crash loop is a useful warning sign.
On a student laptop, run java -version, update your JDK, and update tools that ship their own Java, such as IntelliJ and Android Studio. In India, watch CERT-In for official advice; we had not found a CERT-In note when we wrote this. Our post on CERT-In's Crafty Falcon warning shows how those notes usually look.
Some details may still shift. We have not read the NVD record, and we could not open the BBC and New York Times stories, so we do not repeat their claims. Day-one facts often change, as our Microsoft 365 breach post showed.
Questions people ask
- What is the Java4Shell fix?
- The fix is a Java runtime update released on 17 November 2026, such as Oracle 17.0.21.1 or 21.0.13.1. Restart your apps after updating. Turning off Base64 intrinsics with -XX:-UseBASE64Intrinsics is only a short-term workaround.
- Has Red Hat fixed CVE-2026-114938?
- Red Hat fixes were reported as still in preparation on 18 November 2026. Check the Red Hat CVE page for your OpenJDK package before you assume you are patched.
- Does Java4Shell affect Oracle Java?
- Yes. Oracle Java SE 17, 21, 25 and 27 and the Java 8 Performance Pack are affected on x86-64 chips with AVX-512 VBMI. Oracle shipped fixed builds on 17 November 2026.
Sources
- 1.Calif. Java4Shell: Write once, RCE everywhere. 17 November 2026.
- 2.Tenable. Java4Shell (CVE-2026-114938): Frequently Asked Questions About OpenJDK RCE Vulnerability. November 2026.
- 3.The Hacker News. Java4Shell Flaw (CVE-2026-114938) Enables Pre-Auth RCE in Jira, Jenkins, Keycloak and More. November 2026.
- 4.Qualys. How to Find, Mitigate, and Patch the Critical Java4Shell Flaw (CVE-2026-114938) Now. 17 November 2026.
- 5.Cloudflare Blog. How Cloudflare WAF helps protect against Java4Shell (CVE-2026-114938).

