Java4Shell (CVE-2026-114938) Explained: The OpenJDK Base64 Bug, Who Is Exposed and How to Fix It

Cover image: Java4Shell CVE-2026-114938 explained - OpenJDK Base64 decoder memory corruption, affected versions, AVX-512 exposure check and mitigation

Security analysis, written 20 November 2026. Every claim links to a source we read today. Exploitation details are still moving, so check the vendor pages for the latest.

On 17 November 2026 the security firm Calif published Java4Shell (CVE-2026-114938), a memory-corruption flaw in the Base64 decoder of OpenJDK, the Java runtime behind a large share of enterprise software.[1] Calif says it can be triggered by 64 letter A's followed by one equals sign, and that it used the bug to get remote code execution in Jenkins, Jira, Confluence, Keycloak and others.[1] Oracle shipped fixes the same day.[2] The story has a second layer: the crash had been reported publicly five months earlier, and Calif says an AI agent found the exploitable version in about an hour.[1]

This article explains how the bug works, who is really exposed (fewer systems than the headlines suggest), what to patch, and what to do if you cannot patch today.

Key takeaways
  • Exposure needs three things: an affected OpenJDK 17, 21, 25 or 27 build, an x86-64 CPU with AVX-512 VBMI, and an application that decodes attacker-controlled Base64.[1][6] ARM64 hosts are not affected.[1]
  • Fixes exist. Oracle's builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Other vendors use their own build numbers.[6]
  • Two flags buy time: -XX:-UseBASE64Intrinsics or -XX:UseAVX=2 (x86-64 only).[1]
  • It is serious but not a universal exploit. There is no point-and-shoot payload; each application needs its own chain.[1][5]

How the bug works

Diagram of Java4Shell: 65-byte Base64 input allocates a 50-byte array but the AVX-512 intrinsic writes 64 bytes from offset 48, overflowing 62 bytes into neighbouring heap objects
Figure 1. The mask underflow, step by step. Source: Calif write-up.

Base64 turns binary data into text. It shows up in HTTP Basic authentication, JWTs, file uploads and many network messages.[1] To decode it quickly, HotSpot (OpenJDK's JVM) has an intrinsic: hand-written code that uses AVX-512 VBMI instructions to process many bytes at once.[1] Memory safety is a main selling point of Java, but the JVM itself is written in C, C++ and, here, assembly, where memory corruption still exists.[1]

The error is in how the routine handles the last few characters. The code first computes an output length, then subtracts one for each = padding character. If the remaining tail is something like =, X= or XY=, the length is already zero, so the subtraction underflows to -1 or -2. The instruction used to build the store mask leaves all bits set when the length is 64 or more, so the routine writes a full 64-byte vector.[1]

For the 65-byte trigger, OpenJDK allocates a 50-byte result array, and the 64-byte write starts at offset 48. That puts 62 bytes past the end of the array, in whatever object happens to sit next to it. Java later rejects the input with an exception, but the damage is done.[1] On older OpenJDK 17 builds the trigger needs 128 A's instead of 64.[1]

A crash is the normal outcome. Turning it into code execution needs heap grooming: the attacker sends carefully timed requests so that a writable object and a readable object sit next to the decoder's output, uses the overflow to enlarge a length field, and then reads or writes memory through it. Calif calls the read primitive "JavaBleed", because it can leak keys, tokens and personal data from the Java heap before any code runs.[1][4]

Who is exposed

Three conditions for Java4Shell exposure: affected OpenJDK version, x86-64 CPU with AVX-512 VBMI, and an application that decodes untrusted Base64; ARM64 not affected
Figure 2. All three conditions must hold. Sources: Calif, Tenable, Aikido.

Runtime. Calif says OpenJDK 17.0.6 and newer is affected, and that Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle OpenJDK, Oracle Java SE and Oracle GraalVM for JDK are all built from the vulnerable code.[1] The OpenJDK advisory lists the 17, 21, 25 and 27 lines. It does not list standard Java 8 or 11, although Oracle's Java 8 Enterprise Performance Pack build is affected.[6] One vendor-neutral caveat: the end-of-life lines 18-20, 22-24 and 26 share the code but will get no fix, according to Cycode.[7] Verify that claim against your own inventory.

Hardware. The vulnerable path only runs on x86-64 CPUs with AVX-512 VBMI: Intel Xeon from Ice Lake to Granite Rapids, and AMD EPYC and Ryzen from Zen 4.[1][8] ARM64 systems are unaffected.[1] Many cloud instance families fit, so this is not a niche. To check a Linux host:

grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'

All four flags must appear.[1] Calif also published a bounded proof of concept that prints REPRODUCED on an affected JDK; every write stays inside a real array, so Calif says it is safe to run.[1] Note that it only shows whether the JVM and CPU reproduce the bug, not whether a given application is reachable.[6]

Application. This is the part defenders can't see from a version number. Authentication and file uploads can reach the decoder, and a Java client that opens TLS to a malicious server can also be compromised, according to a client-side exploit shared by researcher samczsun.[1] The Swiss NCSC adds that banking software and other industry-specific Java applications can be affected, and that operators should ask their suppliers.[4]

Which applications did Calif exploit?

Applications Calif reports exploiting via Java4Shell: pre-auth Keycloak, Jira, Confluence, Artifactory, Jenkins, PingFederate; post-auth Kafka, Solr, Elasticsearch, Gerrit, Spinnaker
Figure 3. Calif results in default configurations. The list is not exhaustive.

Calif reports unauthenticated code execution in Keycloak, Atlassian Jira and Confluence, JFrog Artifactory, Jenkins and PingFederate, and authenticated code execution in Apache Kafka broker, Solr, Elasticsearch, Gerrit and Spinnaker, all in default configurations.[1] It holds back its product-specific exploits until people have had time to upgrade.[1]

Is it being exploited? As of 18 November, GreyNoise reported exploitation attempts but had not confirmed a successful one, and it also saw scanning from a public scanner that checks for affected Java versions.[6] VulnCheck says a working code-execution exploit is available to its customers, but expects the bug not to be easily or widely exploitable.[6] Kevin Breen of Immersive says he built an exploit for Tomcat Basic authentication and the java-jwt library, and that it must be adapted for each application.[6] CyberScoop notes that no CVE related to the issue is yet in CISA's Known Exploited Vulnerabilities list, and that researchers expect real-world exploitation to be likely anyway.[2]

Opinions differ on how worried to be. Kevin Beaumont's reaction was: "It's not world ending. It's not very exciting. Just patch as you normally do."[5] Chris Fistonich of Malwarebytes Threat Labs said it is harder to monetise than a point-and-shoot bug, but "this buys you days, not months."[4] We read the evidence as: patch this week, internet-facing identity and CI/CD systems first.

One point on severity scores: Calif rates it 9.2 under CVSS 4.0, while Oracle gives it 8.1 under CVSS 3.1 with high attack complexity.[6] Both reflect the same fact: easy to trigger, hard to weaponise.

The AI angle and a 161-day timeline

Timeline of Java4Shell CVE-2026-114938 from first public crash report on 9 June 2026 to Oracle and OpenJDK fixes on 17 November 2026
Figure 4. Public crash report in June; fix after exploitability was shown. Source: Calif disclosure timeline.

Calif says researcher Quang Luong asked OpenAI's Codex to audit OpenJDK, and it flagged the Base64 bug within about an hour. Another two hours produced the first working exploit, and the total token cost was under $200.[1] Calif's own phrase is the "centaur hacker", part human and part AI. It also says the AI initially produced a lot of unreachable findings, and human-built heap tooling was needed when the agent got stuck.[1]

The more interesting detail is the timeline. According to Calif, a user hit the crash on 9 June and opened an Adoptium issue. In September someone posted a proof of concept and another contributor found the root cause and proposed a fix, but that pull request was closed without merging.[1] Between 9 June and the 17 November fix is 161 days (our arithmetic). Calif's reading: the same pattern as PHP2Shell, where "the bug had already been reported, but it was patched only after we showed it could be exploited."[1] For PHP2Shell, Qualys notes that the flaw reached CISA's KEV list five days after fixes shipped, with probing starting four days before a patch existed.[9]

The takeaway for operations teams is the one security commentators keep making. Malwarebytes' Fistonich: "Finding critical bugs used to be the slow, expensive part. Now... it's the rapid part, and patching is where we're falling behind."[4] Our earlier article on whether rushed patches caused the November outages covers how to do urgent rollouts without creating your own incident. Java is a good test case, because a JVM restart is a fleet-wide event, like the reboot problem in NoisyTCP.

Calif also argues for "vibe-uncoding": deleting code you do not need. The AVX-512 Base64 speed-up ships to every Java user, yet few applications benefit from it.[1] Whatever you think of the term, the lesson is practical: disabling an intrinsic you do not need is a legitimate hardening step.

What to do: inventory, patch, shield, watch

Java4Shell response playbook: inventory Java runtimes, patch to fixed builds, apply JVM flags -XX:-UseBASE64Intrinsics or -XX:UseAVX=2 if patching must wait, and monitor for crashes
Figure 5. A four-step response. Sources: Calif, CISA guidance via TechTarget, Tenable.

1. Inventory every JVM, including the bundled ones

CISA's advice is to review software inventories for JDKs and Java runtimes, including those bundled with third-party applications, and to prioritise internet-facing systems.[4] This is the hard step: Jenkins, Jira, Elasticsearch and Kafka often ship their own runtime or container image. Intersect that list with the hosts that have AVX-512 VBMI to focus on the real exposure.

2. Patch, using your vendor's build number

Oracle's fixed builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, and 8u513-perf for the Java 8 Enterprise Performance Pack.[6] Do not read Oracle's numbers onto other distributions; each vendor ships its own.[6] As of 19 November, according to Tenable, Amazon Corretto and Azul Zulu had fixed builds, Eclipse Temurin had begun releasing them, Ubuntu had released fixes for openjdk-17, 21, 25 and 27 on 18 November, and Red Hat had published fixed OpenJDK packages for RHEL, although some Red Hat products that bundle Java were still listed as affected. Keycloak's 26.8 container images were updated to OpenJDK 21.0.13.1.[6] Then restart every JVM, because a running process keeps the vulnerable code in memory.

3. If you can't patch today

Calif's two options: start the JVM with -XX:-UseBASE64Intrinsics to turn off hardware-accelerated Base64, or with -XX:UseAVX=2 to turn off AVX-512. The second must only be used on x86-64: OpenJDK on ARM does not recognise it and will fail to start.[1] CISA's interim controls are to restrict and validate Base64 input at the application boundary, enforce input-size limits and limit unauthenticated access.[4]

A word of caution about proxies. Some of Calif's current grooming profiles need partial request bodies to reach the application, so a reverse proxy that buffers whole requests (nginx does by default) breaks their timing. But Calif is explicit that this is not a general mitigation: Elasticsearch runs from one complete request, and WebSocket traffic after an upgrade bypasses buffering.[1] The same bug also hits JVMs that make TLS client connections, which no edge proxy sees.

4. Watch for signs

CISA lists rogue runtimes, unexpected JVM crashes and suspicious Java processes as indicators of compromise.[4] Because a failed attempt can crash the JVM, repeated unexplained restarts on an AVX-512 host are worth a look.[1] If a heap leak is plausible on an internet-facing system that holds tokens or keys, plan to rotate them; that last point is our judgment, not an official recommendation.

FAQ

What is Java4Shell?

The nickname for CVE-2026-114938, an out-of-bounds write in OpenJDK's x86-64 Base64 decoder, patched on 17 November 2026.[1][3]

Which Java versions are affected?

The OpenJDK 17, 21, 25 and 27 lines. Standard Java 8 and 11 are not listed, except Oracle's Java 8 Enterprise Performance Pack build.[6]

Does it affect ARM servers or Apple silicon Macs?

No. The vulnerable code only runs on x86-64 CPUs with AVX-512 VBMI.[1]

Is Java4Shell being exploited in the wild?

As of 18 November, GreyNoise had seen exploitation attempts but no confirmed successful exploitation, and the CVE was not in CISA's KEV catalog. Check both sources again before you rely on this.[6][2]

Can I just turn off AVX-512?

Yes, as a stop-gap: -XX:UseAVX=2 on x86-64 hosts only, or -XX:-UseBASE64Intrinsics. Patching remains the real fix.[1]

Was this found by AI?

Calif says Codex found the exploitable variant in about an hour, but also that the crash had been publicly reported months earlier.[1]

Sources
[1] Calif, "Java4Shell: Write once, RCE everywhere," 17 Nov 2026 (timeline updated 19 Nov).
[2] CyberScoop, "Researchers disclose critical flaw in Java with help of AI," 17 Nov 2026.
[3] Cybersecurity Dive, "Major Java vulnerability could help hackers compromise many popular applications," 18 Nov 2026.
[4] TechTarget, "Java4Shell: Critical Java runtime bug discovered 'in one hour' with AI," 18 Nov 2026.
[5] GovInfoSecurity, "AI Agent Finds Critical Java Flaw in Just 3 Hours," Nov 2026.
[6] Tenable, "Java4Shell (CVE-2026-114938): Frequently asked questions," updated 19 Nov 2026.
[7] Cycode, "Java4Shell (CVE-2026-114938): Affected Versions, How to Check and Fix," Nov 2026.
[8] Qualys, "How to Find, Mitigate, and Patch the Critical Java4Shell Flaw," 17 Nov 2026.
[9] Qualys, "PHP2Shell and Node2Shell: Find, Fix, and Verify," 12 Nov 2026.

Comments

Popular posts from this blog

BGP Neighbor States

Reason legend in show ip ospf statistics