Java4Shell (CVE-2026-114938) in Spring Boot, Tomcat, Jetty
A padding miscount in HotSpot's AVX-512 Base64 intrinsic opens a path to heap disclosure and RCE. See which JDKs are exposed and how to patch.

On November 17, 2026, Oracle and the OpenJDK Vulnerability Group shipped fixes for CVE-2026-114938, the OpenJDK HotSpot flaw that Calif researcher Quang Luong named Java4Shell. Oracle, the CNA, scored it High: CVSS 3.1 8.1 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H). The bug is a heap out-of-bounds write (CWE-787 class; the CVE record assigns no CWE ID) in the x86-64 AVX-512 Base64 decode intrinsic: a malformed, padded tail makes JIT-compiled java.util.Base64 decoding write past its output array before the input is rejected. Affected builds are OpenJDK 17.0.6 through 17.0.21.0.3 and every Java 21, 25, and 27 build before the November 17 security release, which fixes it (Oracle builds 17.0.21.1, 21.0.13.1, 25.0.5.1, and 27.0.1.1). Standard Java 8 and Java 11 are not affected.
Running end-of-life Spring Boot on Java 17 or later? The JDK update closes this CVE, and NES for Spring (HeroDevs Never-Ending Support) covers the framework layer the JDK update does not touch.
What is Java4Shell (CVE-2026-114938)?
CVE-2026-114938 is a heap out-of-bounds write in HotSpot's x86-64 Base64 decode intrinsic, the hand-written AVX-512 routine the C2 JIT compiler substitutes for java.util.Base64.Decoder once a decode path gets hot. Oracle files it under the Java SE "Compiler" component; the OpenJDK advisory files it under hotspot/compiler. The CVE record carries no CWE ID. The behavior Calif documents, a vector store that writes past the end of a heap-allocated array, is the CWE-787 (Out-of-bounds Write) class.
The intrinsic arrived with JDK-8268276, "Base64 Decoding optimization for x86 using AVX-512," which landed in JDK 18 in June 2021 and was added to the OpenJDK 17 update line in 17.0.6 (Oracle JDK 17.0.7). That history explains the odd affected range: it starts partway through Java 17, and Java 8 and 11 never received the code at all.
Two conditions gate the bug before attacker input matters:
- Hardware. The vulnerable stub only runs on x86-64 CPUs with AVX-512 F, BW, VBMI, and BMI2. Calif lists Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids, and Granite Rapids, plus AMD EPYC and Ryzen Zen 4 or newer. That describes most current-generation x86 server hardware. ARM64 is not affected.
- JIT state. The decode path has to be compiled by C2 with UseBASE64Intrinsics enabled, which is the default. An attacker can get there on their own by sending valid Base64 until the method is hot.
Root cause: the padded-tail store mask
When the remaining input is shorter than a full 64-byte block, the stub builds a 64-bit AVX-512 store mask from the expected output length, then subtracts one byte of output for each trailing = pad. Calif's write-up shows that for certain malformed tails the expected output length is already zero before that subtraction, so it underflows to -1 or -2. The bzhi instruction that converts the length into a mask leaves every bit set when its index is out of range, so the mask comes out all ones and the masked store (evmovdqub, HotSpot's emitter for VMOVDQU8) writes all 64 lanes.
The Java side sized the destination array from the input length and padding count, so the store runs past the end of it. In Calif's example, a 50-byte output array takes a 64-byte write starting at offset 48, and 62 bytes land outside the array. Only after that does the stub hand control back, and the Java code rejects the input with IllegalArgumentException. The rejection is real, but it arrives after the heap has been written. Application code that catches the exception and returns a 400 has already been corrupted.
Most of the written bytes are not attacker-chosen. The first byte is fully controlled, the second is partially controlled, and the rest are fixed (the last 16 bytes of the store are always 0x9a). What the attacker mainly controls is where the write lands relative to the buffer. That constraint is a large part of why Oracle scored Attack Complexity as High.
Severity and exploit conditions
Oracle's advisory note says the flaw is exploited by supplying data to the affected APIs, "such as through a web service." That reaches further than listening services. Calif reports a client-side exploit, shared with it by researcher samczsun, in which a Java program that opens a TLS connection to a malicious server is compromised even though it exposes no service of its own.
On the score: Calif, which reported the bug, rates it 9.2 (Critical) under CVSS 4.0 on its disclosure page, without publishing a vector string. That score is not in the CVE record. The record carries only Oracle's CVSS 3.1 score of 8.1, and NVD had not published its own analysis as of November 17, 2026.
Exploit prerequisites:
- An affected JDK build running on an x86-64 CPU with AVX-512 VBMI.
- C2 and the Base64 intrinsic enabled (both default on server JVMs).
- Attacker-controlled bytes reaching the java.util.Base64 basic or URL-safe decoder, whether they arrive in a request to a service or, per Calif's client-side result, over a connection the Java program opened itself.
- For anything beyond memory corruption, an application-specific chain. Calif describes each target needing a decoder route, a live object to enlarge, a response path that returns heap bytes, a groomable heap layout, and an application action to finish on. Low, stable network latency to the target helps.
Exploitation status
- Public proof of concept: Calif's write-up publishes the trigger input and a self-contained reproducer that warms the decoder and shows the out-of-bounds write landing inside a larger array. It proves the corruption. It is not a remote exploit. See "Test whether your JVM is vulnerable" below.
- Demonstrated targets: Calif reports remote code execution in eleven widely deployed Java products in their default configurations, six of them before authentication, plus sample Struts and Spring Boot applications and a client-side TLS exploit. The full list is under "Which products are affected by Java4Shell?" below. Calif is withholding the product-specific chains until users have had time to patch.
- Leak before patch: Before Oracle's 1:00 PM PT release on November 17, 2026, Calif posted on X that it had discovered and reported Java4Shell, opening with "Since the vulnerability has leaked." It published the technical write-up after the patch shipped. The usual quiet window between patch and public analysis did not happen.
- CISA KEV: not listed as of the November 17, 2026 catalog.
- In-the-wild exploitation: no public reports as of November 17, 2026.
- Fake PoCs: GitHub repositories named after the CVE appeared within hours. The most visible one is a local version-check script, not an exploit. Do not run unreviewed "PoC" code on production hosts.
What an attacker can do
- Crash the JVM. A misplaced write corrupts a live object or heap metadata and takes the process down. Every failed attempt risks this, so unexplained crashes and fresh hs_err_pid*.log files on internet-facing x86 services deserve a look.
- Read the Java heap. Calif's chain uses the fixed write to overwrite the length of an adjacent array, then uses that array to enlarge a second one whose contents get copied into the HTTP response. Calif calls this stage JavaBleed. Session tokens, API keys, TLS private keys, database credentials, and customer records in memory become readable before any code runs.
- Tamper with application state through data-only attacks on objects next to the overflow.
- Execute code. Calif escalates the bounded write into arbitrary writes that reach the JIT Code Cache and JVM hooks, running attacker code as the JVM's OS user.
The entry points are wherever untrusted bytes hit Base64.getDecoder() or Base64.getUrlDecoder():
- Authorization: Basic headers on endpoints protected by Spring Security HTTP Basic, Jetty's BasicAuthenticator, or Tomcat's BasicAuthenticator (9.0.89 and later, 10.1.23 and later). The header is decoded before credentials are checked.
- JWTs parsed by libraries that call Base64.getUrlDecoder(), such as Auth0 java-jwt's JWTDecoder.
- Base64 fields in JSON, XML, or form bodies that application code decodes with Base64.getDecoder(): file uploads, encoded identifiers, webhook payloads.
- WebSocket frames after an upgrade. Calif notes that proxy request-body buffering no longer applies once the connection is tunneled.
- Outbound TLS connections from a Java client to a server the attacker controls, per the client-side exploit samczsun shared with Calif. Any Java process that connects to hosts you do not control falls in this group.
Which products are affected by Java4Shell?
Any Java product running on an affected JDK on AVX-512 hardware is in scope, because the bug lives in the runtime, not the product. Calif's testing shows how far that reaches. It reports remote code execution in the following products in their default configurations, and calls the list non-exhaustive:
The sample applications matter more than any single product on that list. Calif notes that ordinary features such as authentication and file uploads expose the vulnerable decoder, so in-house Java applications are exposed the same way the named products are.
For packaged products, check which JDK the product actually runs. Elasticsearch ships with a bundled JDK, so patching the host's Java does not patch it, and many products ship as container images with their own runtime. Those need the vendor's updated release, or a supported way to run them on a patched JDK.
Does Java4Shell affect Spring Boot, Tomcat, or Jetty?
Calif demonstrated remote code execution against a sample Spring Boot application, so the practical answer is yes. But not as a framework bug. No Spring, Tomcat, or Jetty release fixes CVE-2026-114938, and upgrading one does not close it. What the framework decides is whether an unauthenticated request reaches the vulnerable decoder with no application code involved. We checked the decode call in each project's source:
A "No" here only covers that code path. Your own code, or another library in the same JVM, can still hand request data to java.util.Base64.
Several of those pre-authentication routes run on end-of-life software. Spring Boot 2.7 ships Spring Security 5.7, is compatible up to Java 21, and left OSS support in 2023 (endoflife.date). Moving an EOL Boot 2.7 application onto Java 17 or 21 is a common way to buy time, and that combination is exactly the exposed one. Jetty 9.4, 10, and 11 are past end of community support, with their final open-source releases in August 2025 (endoflife.date), and Jetty 10 and 11 require Java 11 or later, so many of those servers run on 17 or 21 today.
The fix is the same for all of them: update the JDK. A JDK update within a release line is a drop-in for Spring Boot 2.7, Tomcat, and Jetty. What it does not do is patch the framework's own CVEs, which on EOL branches no longer get open-source releases. See the security risks of staying on Spring Boot 2.7 and Spring Framework 5 for what accumulates on that side.
Who is affected by Java4Shell?
Exposure takes three things at once: an affected JDK build, an x86-64 CPU with AVX-512 VBMI, and a route for attacker bytes into java.util.Base64. That route is not limited to listening services. Calif's client-side result puts outbound Java clients in scope too: HTTP clients, third-party API integrations, webhook senders, and build or CI agents, anything on an affected JDK that opens TLS connections to servers you do not control.
Affected versions by Java line, per the OpenJDK advisory, the CVE record, and JDK-8268276:
Eclipse Temurin, Amazon Corretto, Azul Zulu, the Microsoft Build of OpenJDK, Red Hat's OpenJDK, and Linux distribution packages carry the same code and ship the fix under their own version labels on their own schedules. Oracle GraalVM for JDK 17.0.21.0.3 and 21.0.13.0.3, and Oracle GraalVM Enterprise Edition 21.3.20.0.3, are also listed as affected.
Java 26 deserves a specific callout: it is a non-LTS release, and Eclipse Temurin and Amazon Corretto ended its updates in September and October 2026 (endoflife.date), so no fixed 26 build is coming. Anyone who adopted it early needs to move to an LTS line.
Is Java 8 or Java 11 affected by Java4Shell?
No. Standard Java 8 and Java 11 builds are not affected by CVE-2026-114938, because the AVX-512 Base64 decode intrinsic was never added to either line. The OpenJDK advisory marks the CVE against Java 17, 21, 25, and 27 only.
There is one Java 8 exception. Oracle lists 8u511b33-perf, its Java 8 Enterprise Performance Pack, as affected. That runtime runs Java 8 applications on the HotSpot JVM from the JDK 17 line, so it inherits the intrinsic. If you run it, treat it like a JDK 17 host: take the November 17 update or apply the JVM flags in the mitigation table.
Do not read this as a reason to stay on Java 8. The same November 17 release fixed five other CVEs that do reach Java 8 and 11 (listed under Related CVEs below), and Java 8 support windows now differ sharply by vendor. Check where your distribution stands in Java 8, 11, 17 EOL dates by OpenJDK vendor, and see you're not just running Java 8, you're running an entire EOL stack for the framework side of that picture. Don't read the Java 8 answer as "Struts is safe," either. Calif demonstrated remote code execution on a sample Apache Struts application. A Struts application still running on Java 8 or 11 is outside this CVE. The same application moved onto Java 17 or later is inside it (see why modern Java broke Struts for what that move involves). For the end-of-life Struts 1.x, 2.3, and 2.5 lines, NES for Struts covers the framework's own CVEs while you patch the JDK underneath.
How to check a host
- Run java -version inside the running container or image, not on the host. Base images pin their own JDK and are often months behind.
- Check the CPU from inside the workload: grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'. If all four flags print, the hardware gate is open.
- Confirm the effective JVM flags: java -XX:+PrintFlagsFinal -version | grep -E 'UseAVX|UseBASE64Intrinsics'.
Test whether your JVM is vulnerable to Java4Shell
Version and CPU checks tell you whether a host should be vulnerable. To confirm it, use the bounded reproducer in the PoC section of Calif's write-up. It warms Base64.getDecoder() with valid input until C2 picks the intrinsic, then decodes the trigger, 64 A characters followed by a single = ("A".repeat(64) + "="), into a 4,096-byte array. On an affected JVM the decoder rejects the input but has already changed 62 bytes past the decoded output (offsets 50 to 111), and the program prints REPRODUCED. Every write lands inside that real array, so the test is safe to run.
- Run it on the same CPU and JDK build as production. An ARM laptop or an older Xeon will print NOT REPRODUCED regardless of the JDK version.
- On older OpenJDK 17 builds, Calif notes the trigger is 128 A characters followed by =. The published reproducer checks offsets for the 65-character form, so a NOT REPRODUCED on Java 17 is not a clean result on its own.
- Run it locally, not against a live service. Sent to a running application, the same input corrupts that application's heap.
- Use this instead of the "PoC" repositories circulating on GitHub. It is the researcher's own code and it is short enough to read before you run it.
Java4Shell mitigation guidance
Calif published both flags, and Upwind reports both held clean on every affected version it tested. Prefer -XX:-UseBASE64Intrinsics: it removes the vulnerable code path and nothing else. Remove the flag after the patched JDK is in place.
A reverse proxy that buffers full request bodies, which nginx does by default, breaks some of Calif's grooming profiles but not all of them. Calif's Elasticsearch chain, which requires authentication, works from a single complete request, and WebSocket traffic bypasses body buffering after the upgrade. Treat buffering as friction, not protection.
If an internet-facing service on an affected JDK and AVX-512 hardware crashed without explanation since November 17, 2026, treat it as a possible exploitation attempt. The heap disclosure stage comes before code execution, so rotate the secrets that service held in memory: session signing keys, API tokens, database credentials, and TLS private keys.
Disclosure timeline
- June 2021: JDK-8268276 adds the AVX-512 Base64 decode intrinsic to JDK 18.
- January 2023: OpenJDK 17.0.6 ships the intrinsic to the Java 17 line (Oracle JDK follows in 17.0.7).
- October 22, 2026: Oracle reserves CVE-2026-114938.
- November 17, 2026 (before the patch): Calif says on X that the bug has leaked ahead of the coordinated release.
- November 17, 2026: OpenJDK publishes its vulnerability advisory. Oracle releases patched builds at 1:00 PM PT, Calif publishes its write-up, and the CVE record goes public. Oracle's credit statement lists Quang Luong of Calif.io and Albert Yang for this CVE.
Related CVEs
The November 17, 2026 OpenJDK release fixed ten OpenJDK CVEs. Two others sit in the same hotspot/compiler area: CVE-2026-114941 (CVSS 7.0, Java 21, 25, and 27) and CVE-2026-114946 (CVSS 4.8, every line from 8 through 27).
Five of the ten reach Java 8 and Java 11, which is why "not affected by Java4Shell" does not mean "skip this release": CVE-2026-114939 (Kerberos/JGSS, 7.4), CVE-2026-114940 (JSSE, 7.4), CVE-2026-114943 (HotSpot runtime, 6.5), CVE-2026-114944 (java.lang.management, 5.9), and CVE-2026-114946. The full matrix is in the OpenJDK advisory.
On the framework side, the authentication layer is where EOL stacks keep taking hits: Jetty's digest authentication bypass, CVE-2026-10050, the JaspiAuthenticator bypass, CVE-2026-5795, and the April 2026 Spring Security batch with two critical authorization bypasses.
Taking action
Patch the JDK first. Every Java 17.0.6+, 21, 25, and 27 runtime on Ice Lake, Sapphire Rapids, or Zen 4 class hardware should move to its distribution's November 17 security build, and container images need a rebuild to pick it up. That includes outbound clients and build agents, not only listening services, and products that bundle their own JDK need the vendor's release. Where a restart onto a new build cannot happen today, -XX:-UseBASE64Intrinsics closes the vulnerable path in the meantime. If you are on a non-LTS JDK, there is no fix coming for your line; move to 21 or 25.
Java 8 and 11 dodge this one by history, not by design. They still need the November 17 builds for the five CVEs that do reach them.
Then look one layer up. Java4Shell is a JDK bug, and the JDK update closes it on any framework. But several of the stacks with a route to the decoder are end-of-life: Spring Boot 2.7 with Spring Security 5.x, Jetty 9.4, 10, and 11, and Struts 2.5 applications moved onto newer JDKs. Patching the runtime does nothing for those frameworks' own CVEs, which no longer get open-source fixes.
NES for Spring keeps Spring Boot 2.7 and Spring Framework 5.3 applications patched as drop-in replacements, so you can keep the JDK current and the framework secure without forcing a Spring Boot 3 migration into the same quarter. For Jetty 9.4, 10, and 11, NES for Jetty does the same, built in partnership with Webtide, the team that maintains Jetty, and NES for Struts covers Struts 1.x, 2.3, and 2.5. Patch the runtime today, keep the framework covered, and migrate on your own schedule.
Resources
View All Articles
.png)

