The short version. Java is memory-safe, and in November 2026 a padded Base64 string wrote 62 bytes past the end of a heap array in every OpenJDK release from 17.0.6 onward. The bug was not in Java code. It was in the hand-written x86-64 assembly that HotSpot's C2 compiler substitutes for Base64.Decoder once the method gets hot. The bounds check that should have caught the input did run — after the write. CVE-2026-114938, nicknamed Java4Shell.
This note is about the architectural lesson, which none of the security write-ups states: a JIT intrinsic is a trusted, unverified native implementation sitting underneath a language whose entire safety story is that such code does not exist in your program.
What an intrinsic is, and why one existed here
HotSpot recognises certain JDK methods by name and, when the JIT compiles the surrounding code, discards the Java body and emits an architecture-specific machine-code stub instead. The JDK marks the eligible methods with an internal annotation — not a userland construct, and not something application code can apply. Math.sin() and System.arraycopy() are the classic examples. Base64 decoding is another: on CPUs with AVX-512 VBMI, a vectorised decoder is dramatically faster than the portable Java loop.
The substitution is the point. It is also the trust boundary. Inside the Java body, every array write is bounds-checked by construction. Inside the stub, the bounds discipline is whatever the stub's author wrote by hand in assembler macros, reviewed by whoever reviewed that patch.
What went wrong, precisely
The defect is in the AVX-512 Base64 decoder stub for x86-64. The output-size computation underflows on a padded tail; the resulting store mask covers a full 64-byte write; the decoder writes 62 bytes past the end of its output array — 63 for a == tail. One analysis describes the root cause as a miscalculated store mask for a padded tail, with the fix landing in HotSpot's x86-64 stub generator.
The ordering detail is the one worth remembering. Java does reject the malformed input. One write-up puts it plainly: Java "then rejects the input with IllegalArgumentException, after the write has happened." The validation was not missing. It was downstream of the thing it was supposed to guard. A language-level check that runs after an optimized native path has already written is not a check.
The shortest triggering input is reported as 65 characters on Java 21, 25 and 27, and 129 on Java 17.
Preconditions — which is to say, who is actually exposed
Four things must hold together, and they are a useful template for reasoning about any intrinsic bug:
x86-64 with AVX-512 VBMI. The vectorised stub does not exist elsewhere. ARM, including Apple Silicon, is out.
The intrinsic enabled and in use — effectively
UseAVXabove 2 withUseBASE64Intrinsicstrue.C2-compiled code. The interpreter and the Java body are fine. The bug appears only once the method is hot enough to be compiled with the stub. This is an unpleasant property: the vulnerable code path switches on under load.
Attacker-controlled input reaching
java.util.Base64's basic or URL decoder, with a padded tail. Which is to say: any service that decodes a token, a header, a cookie, a JWT or a certificate from an untrusted party.
Versions
Affected: OpenJDK 17.0.6 and later, and every release from 18 upward, including 21, 25 and 27, on qualifying x86-64 hardware. Java 8 and 11 are not affected — the intrinsic predates neither, but the vulnerable form of it does not reach them.
Fixed builds: 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1, with Java 8 commercial-performance builds moving from 8u511b33-perf to 8u513-perf. End-of-life lines — 18–20, 22–24, 26 — carry the same code and will not be fixed, which is its own argument for not sitting on a non-LTS release.
Vendor repackagers moved at different speeds, and distribution labels do not line up with upstream version numbers.
How bad: a case study in reading severity scores
The published numbers disagree, and the disagreement is instructive rather than embarrassing.
| Source | Score | Scale |
|---|---|---|
| Oracle | 8.1 | CVSS 3.1 |
| The discovering researcher | 9.2 | CVSS 4.0 |
| Red Hat (preliminary) | 9.8 | — |
| Amazon | 8.8 | — |
No CVSS vector string was published for the CVE, which is why the numbers cannot be reconciled. Oracle rates attack complexity as high, and describes it as hard to exploit but requiring no login. Amazon's reading is more precise and probably the most useful one for planning: a JVM crash for unauthenticated users, and code execution for an authenticated low-privileged user.
On exploitability: the overflow on its own usually crashes the process. The researcher states there is no universal exploit, and independent labs reproduced crashes and a memory leak but not code execution. Reporting on whether the researcher's own demonstration shows working exploitation is contradictory — one account says the public page withholds the weaponised chains while a demo video shows planted webshells; another says the attack code for the named products is being held back entirely. No in-the-wild exploitation was reported as of mid-November 2026.
Named as exploitable in default configuration without a login: Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, PingFederate. With a login: Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit, Spinnaker. These are the researcher's claims, and the lists are explicitly described as incomplete. A Java program that merely opens a TLS connection to a malicious server is also reported as compromisable.
Mitigation, and a trap
The blunt options are -XX:-UseBASE64Intrinsics or capping -XX:UseAVX=2, both of which cost Base64 throughput on a path many services run hot. The narrowest option — unlocking diagnostic VM options and disabling only _base64_decodeBlock — has been reported to prevent the JVM from starting at all in some configurations. Worth testing before it goes in a rollout.
The disclosure timeline, which is the second story
9 September 2026: the overflow-triggering input is posted publicly in a proposed pull request, which is closed unmerged in early November.
14 October 2026: the fix is committed under embargo. One analysis notes the commit title, "Base64 optimization improvements," gives no hint that it is a security fix.
17 November 2026: disclosure and patches, after the vulnerability leaked ahead of its planned date.
So the triggering input sat in a public code-hosting thread for roughly ten weeks, and the fix sat in a public repository for a month under a title designed not to attract attention. Both are ordinary embargo practice. Both are also exactly the pattern an attacker watching commit streams is looking for, and the second one is a known tension in open-source security handling rather than a mistake specific to this case.
What to take from it
Memory safety is a property of a code path, not of a language. Every managed runtime has an escape hatch for performance: JIT intrinsics, vectorised library stubs, FFI calls into native libraries, unsafe blocks. The safety guarantee holds right up to that boundary and stops. A reader who knows their stack is "all Java" or "all Rust" should be able to say where the native stubs are, and whether anything untrusted reaches them.
Check placement matters more than check existence. The validation existed. It ran after the write. Any time an optimized path is substituted for a reference implementation, the question is not "is the input validated" but "is it validated before the fast path touches memory." That question has an answer per intrinsic, and nothing in the type system asks it for you.
Optimized paths engage under load, which inverts normal testing intuition. A test suite that never gets a method hot enough for C2 runs the safe Java body. The vulnerable configuration is the production one. Fuzzing a JDK intrinsic requires deliberately warming the method first — an easy thing to leave out of a harness.
A fast path is a second implementation, and needs a differential test. The portable Java body is a reference oracle sitting right there in the same source tree. Any input where the stub and the body disagree is a bug by construction, and the comparison is cheap to automate. That this class of bug reaches a shipped LTS release suggests the comparison is not run exhaustively over edge-shaped inputs — padding, lengths near vector-width boundaries, truncated tails.
Severity scores without vectors are not comparable. Four organisations published four numbers for the same bug across two scale versions with no vector string. For planning purposes, the sentence "unauthenticated crash, authenticated code execution" carried more information than any of the four numbers.
Sources: published analyses of CVE-2026-114938 from watchTowr, Endor Labs and Cycode, and reporting in The Hacker News, all from November 2026. The OpenJDK security advisory, the underlying JDK issue, the HotSpot commit and the researcher's own disclosure page are not covered here; version tables and root-cause details are as those four analyses report them, and they disagree on some vendor fix availability. No reproducer was run. The generalisations in the final section are this note's own and are stated in none of the sources.