Tag: Jira

Java4Shell (CVE-2026-114938): a Base64 JIT bug that needs AVX-512 VBMI hardware

Java4Shell (CVE-2026-114938): a Base64 JIT bug that needs AVX-512 VBMI hardware

Sixty-five characters. That is roughly how long a Base64 string has to be to make a Java server that was fully patched last week write 62 bytes past the end of an array on its own heap. No deserialization gadget, no JNDI lookup, no reflection trick: just a string ending in an equals sign, handed to the most boring API in the JDK on the wrong kind of CPU.

On November 17, 2026, the research firm Calif disclosed CVE-2026-114938, which it calls Java4Shell. It is a memory corruption bug in the hand-written AVX-512 assembly that HotSpot’s C2 compiler uses to speed up java.util.Base64 decoding. Calif says it turned that into pre-authentication remote code execution against default installs of Jira, Confluence, Keycloak, Jenkins, JFrog Artifactory and PingFederate. Oracle and the OpenJDK project shipped fixes the same day.

Severity: critical in my book, because of where Java runs and what Calif demonstrated, even though Oracle rates it 8.1 and real-world RCE is hard. It is a narrower bug than the name suggests, and the hardware gate matters more than most headlines admit. No in-the-wild exploitation was reported as of November 17, and I found nothing newer on November 18.

At a glance

  • CVE: CVE-2026-114938 (“Java4Shell”), heap out-of-bounds write (CWE-787 per Red Hat).
  • CVSS: 9.2 under CVSS 4.0 (Calif); 8.1 under CVSS 3.1, AV:N/AC:H/PR:N/UI:N (Oracle); Red Hat lists a preliminary 9.8.
  • Affected: OpenJDK 17.0.6 and later, plus the 21, 25 and 27 lines, and every distribution built from them (Oracle, Corretto, Temurin, Microsoft, Zulu, Liberica, SapMachine, Red Hat). Oracle’s Java 8 Enterprise Performance Pack build is also listed. Standard Java 8 and 11 are not.
  • Hardware gate: only x86-64 CPUs with AVX-512 VBMI (Intel Ice Lake Xeon and newer, AMD Zen 4 and newer, plus Intel’s 2019-2021 Ice Lake, Tiger Lake and Rocket Lake client chips per VulnCheck). ARM64 is not affected.
  • Exploitation: a trigger-only PoC is public. Calif’s product exploit chains are withheld. No in-the-wild exploitation reported as of November 17 (BleepingComputer, Tenable), and I found nothing newer on November 18; not in CISA KEV.
  • Fix: Oracle builds 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and 8u513-perf (as reported by Tenable). Other distributions on their own schedules. Workaround: -XX:-UseBASE64Intrinsics.
  • Who should care: anyone running internet-facing Java services on recent Intel or AMD server hardware, physical or cloud.

What we know

Calif researcher Quang Luong found the bug. According to BleepingComputer, he used OpenAI’s Codex while auditing OpenJDK internals, found the flaw in about an hour, had a first working exploit about two hours later, and spent under $200 in AI usage. Oracle credits Luong and Albert Yang, per Tenable. Red Hat says Calif reported the issue to it ahead of Oracle’s fix.

The OpenJDK advisory and Oracle’s November 2026 Critical Patch Update went out on November 17 at 1:00 pm Pacific, per Calif. BleepingComputer reports the CPU fixes 655 vulnerabilities across Oracle’s portfolio. A sourcing caveat: I could not open Oracle’s CPU page or the OpenJDK advisory (both returned HTTP 403), so the fixed builds below come from Tenable’s and HeroDevs’ reading of Oracle’s documents. They agree, but treat them as unverified until you see them in your vendor’s release notes.

Calif published a root-cause write-up and a standalone trigger program whose overflow stays inside a larger array it owns, so it proves the bug safely. The product-specific chains stay private until users have had time to upgrade. No in-the-wild exploitation was reported as of November 17, and I found nothing newer on November 18.

How it works

An intrinsic is a method the JIT compiler swaps out for hand-tuned machine code. Once a Base64 decode call gets hot enough for C2 to compile it, and the CPU advertises AVX-512 VBMI, HotSpot stops running the Java implementation and runs a vectorised assembly routine instead. This intrinsic (JDK-8268276, per HeroDevs) landed in JDK 18 and reached 17.0.6 in January 2023 (Equixly): nearly four years in production.

The final chunk of input is written with a masked 64-byte vector store: a mask decides which of the 64 byte lanes actually get written. Calif explains that the mask is derived from the remaining output length, and the padding logic decrements that length once for each =, even after it has already reached zero. The counter goes to -1 or -2. The bit-manipulation instruction that builds the mask treats that negative value as “everything”, so all 64 lanes are written. In Calif’s example, 64 valid characters plus one = leave a 50-byte output buffer, the store starts at offset 48, and 62 bytes land past the end.

Two details shape the real risk. First, the attacker controls very little of what gets written: Calif says byte 0 is fully controlled, byte 1 only partly (4 bits), and bytes 2 to 63 are uncontrolled, with bytes 48 to 63 always 0x9a. Second, the decoder then throws IllegalArgumentException as if nothing happened, so the application sees an ordinary “bad input” error while its heap is already damaged.

Five-step diagram of the Java4Shell attack chain: reach a Base64 decode with attacker input, warm the decoder until C2 compiles it, send input ending in a padding character, the AVX-512 masked store overwrites 62 bytes past the array, and heap grooming turns corruption into a crash or code execution.
How Java4Shell goes from a Base64 string to heap corruption. Based on Calif’s write-up, VulnCheck and Equixly.

Getting from there to code execution is the hard part. Per Calif, each target needs a route to the decoder, a useful object right after the array, a way to read memory back, and a heap layout that lines it all up. Grooming is probabilistic, failed attempts can crash the JVM, and remote grooming is sensitive to network latency (Calif rented a VM in the same cloud region as its targets). VulnCheck adds that RCE needs non-trivial heap grooming plus a memory disclosure to get past ASLR.

Which code paths reach it? Equixly and HeroDevs point at everyday inputs: HTTP Basic Authorization headers, which Spring Security decodes before any password check (Equixly) and which HeroDevs lists as a pre-auth route through Jetty’s and Tomcat’s BasicAuthenticator (Tomcat 9.0.89+ and 10.1.23+); JWTs in libraries that call Base64.getUrlDecoder(), such as Auth0 java-jwt; and Base64 fields in request bodies. The MIME decoder and libraries with their own decoders (Jackson, Commons Codec, JJWT, Nimbus) avoid the flawed path. Calif also mentions a client-side exploit, shared by samczsun, that works against a Java program connecting over TLS to a malicious server.

Who is affected and how badly

Three conditions have to hold at the same time, and this is where the exposure gets smaller than “every Java app”.

Diagram of the three gates that must all be open for Java4Shell exposure: an affected JDK build, an x86-64 CPU with AVX-512 VBMI, and an attacker-reachable java.util.Base64 basic or URL decode. Lists what closes each gate.
All three gates must be open. Closing any one of them removes the exposure.

The JDK gate is wide: 17.0.6 through the November 17 builds, and all of 21, 25 and 27. The hardware gate is the interesting one. VulnCheck notes that Intel disabled AVX-512 on client chips from Alder Lake (12th gen) onward, so most developer laptops will not reproduce this, while Ice Lake and Sapphire Rapids Xeons and AMD Zen 4/5 EPYC servers will. ARM hosts such as Graviton and Ampere are out. The blind spot: “it doesn’t reproduce on my laptop” tells you nothing about production.

The reachability gate is where the products come in. Calif’s pre-auth list includes identity providers (Keycloak, PingFederate) and build infrastructure (Jenkins, Artifactory), exactly the boxes you least want an attacker on. Its post-auth list adds Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. Both lists are non-exhaustive.

On the severity gap: Oracle scored attack complexity high, which drags CVSS 3.1 to 8.1. Calif has not published the CVSS 4.0 vector behind its 9.2, so I can’t say which metrics differ. My practical split: denial of service is easy (VulnCheck says a burst of requests reliably brought a service down in its testing), and RCE is expensive. Calif has demonstrated it against real products. Others claim it without public proof: Wiz says its tooling built an exploit within two hours, Kevin Breen of Immersive says he has an application-specific exploit (per Tenable), and VulnCheck sells a full RCE exploit to its customers. None of those exploits is public, and no in-the-wild exploitation was reported as of November 17; I found nothing newer on November 18.

What to do now

  1. Find your exposed JVMs first, not your Java installs. A host is in scope only if the running JDK is affected and the CPU exposes avx512f, avx512bw, avx512vbmi and bmi2. Check inside the container, not on the host.
  2. Patch internet-facing identity and CI systems first: Keycloak, PingFederate, Jenkins, Jira, Confluence, Artifactory. For Oracle JDKs, the fixed builds reported are 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 and 8u513-perf. For Temurin, Corretto, Zulu, Microsoft, Red Hat and others, wait for the vendor’s own release that names CVE-2026-114938. As of November 18 I could not confirm those version numbers, and Red Hat says it is still assessing its packages (bulletin RHSB-2026-018).
  3. Check bundled runtimes: container images and vendor installers can carry their own JDK, so rebuild images on patched bases. Upgrading Spring, Tomcat or Jetty does nothing here; only the JDK fix closes it (HeroDevs). Restart or redeploy after patching, because a running JVM keeps the old code.
  4. Where you cannot patch today, add -XX:-UseBASE64Intrinsics to the JVM options. It disables only the vulnerable fast path. VulnCheck’s tested form puts -XX:+UnlockDiagnosticVMOptions in front of it. The blunter -XX:UseAVX=2 also works on x86-64 but slows other vectorised code such as crypto (Equixly), and Calif warns that a JVM on ARM refuses to start with it, so do not roll it out fleet-wide blindly. Neither Oracle nor OpenJDK has endorsed these flags.
  5. Do not lean on your reverse proxy: Calif says nginx request buffering is not a mitigation and does nothing for WebSocket frames. And, as HeroDevs warns, do not run unreviewed GitHub “PoC” repositories or send the trigger to a live service.

A quick inventory pass on a Linux host or inside a container. The CPU flag check is the one Calif publishes; the process and flag checks are my own commands, built on the published CPU flag names and the two workaround flags. Run it inside the workload (for example with kubectl exec), as the same user as the JVM. jcmd ships with a full JDK, so JRE-only images need the /proc lines instead:

# CPU gate: prints 4 when all four flags are present and the vulnerable path can run
grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -cE '^(avx512f|avx512bw|avx512vbmi|bmi2)$'
# Which JDK is this running process actually using?
readlink -f /proc/<PID>/exe
"$(readlink -f /proc/<PID>/exe)" -version
jcmd <PID> VM.version
# Is the workaround set on the running process (command line or JAVA_TOOL_OPTIONS)?
tr '\0' '\n' < /proc/<PID>/cmdline | grep -E 'UseBASE64Intrinsics|UseAVX'
tr '\0' '\n' < /proc/<PID>/environ | grep JAVA_TOOL_OPTIONS
jcmd <PID> VM.flags | tr ' ' '\n' | grep -E 'UseBASE64Intrinsics|UseAVX'

One trap: java -XX:+PrintFlagsFinal -version starts a new JVM from whatever java is on your PATH and shows its defaults. It tells you nothing about the flags of a service that is already running.

Detection and monitoring

No IOCs have been published, and VulnCheck’s network and Sigma rules are customer-only, so everything here is behaviour-based. Two parts of the attack can be caught: the input itself, if something in front of the JVM can inspect the Authorization header, and the crashes that failed grooming and trigger bursts cause (Calif, VulnCheck). The middle of the attack, warming the decoder with valid requests, looks exactly like normal traffic.

RuleCategoryLog sourceATT&CKLevel
Basic Authorization with impossible Base64 paddingWeb/AppWAF or proxy (webserver)T1190, T1499.004High
JWT Bearer token containing paddingWeb/AppWAF or proxy (webserver)T1190, T1499.004Medium
JVM fatal error log hs_err_pid createdCross-Platformfile_event (Sysmon, EDR)T1499.004, T1190Medium
JVM fatal error banner in service outputWeb/Appjvm application (stdout, pod logs)T1499.004, T1190Medium

The highest-signal rule is the first one. Correctly padded Base64 always has a length that is a multiple of four, and the trigger Calif describes is a run of valid characters ending in = just past a 64-character block, which no encoder produces. The rule alerts when a Basic credential of at least 32 Base64 characters ends in padding but has an impossible length. Equixly suggested this check. One warning: most access logs do not record the Authorization header, and logging it means storing passwords, so run this logic in your WAF and log only the verdict.

title: Java4Shell Trigger Shape - Basic Authorization With Impossible Base64 Padding
id: 9dc30520-911b-44ef-a532-16ff2ef66e47
name: java4shell_basic_auth_impossible_padding
status: test
description: |
Detects HTTP Basic Authorization values of 32 or more Base64 characters that end in '=' padding but whose
total length is not a multiple of four, which no valid encoder produces. This is the input shape that
triggers the CVE-2026-114938 (Java4Shell) heap overflow in the HotSpot AVX-512 Base64 decode intrinsic.
references:
- https://calif.io/java4shell/
- https://equixly.com/blog/2026/11/17/cve-2026-114938-pre-auth-heap-overflow-in-java-17-21-and-25/
- https://www.vulncheck.com/blog/java4shell
- https://netsec101.com/?p=326
author: netsec101.com
date: 2026-11-18
tags:
- attack.initial-access
- attack.impact
- attack.t1190
- attack.t1499.004
- cve.2026-114938
- detection.emerging-threats
logsource:
category: webserver
definition: 'Requirement: a WAF, reverse proxy or API gateway that can inspect the Authorization request header, mapped to the field cs-authorization. Access logs do not record this header by default, and storing Basic credentials in a SIEM is a risk in itself: prefer running this logic inside the WAF and logging only the verdict.'
detection:
selection_impossible_padding:
cs-authorization|re: '^[Bb][Aa][Ss][Ii][Cc] +(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]?={1,2}|[A-Za-z0-9+/]{2}=|[A-Za-z0-9+/]{3}==)$'
selection_min_length:
cs-authorization|re: '^[Bb][Aa][Ss][Ii][Cc] +[A-Za-z0-9+/]{32}'
condition: all of selection_*
falsepositives:
- Vulnerability scanners and fuzzers that send malformed Basic credentials
- Broken clients that truncate or hand-build the header (rare; baseline first)
level: high

For monitoring, the crash rules matter more than the header rules, because they also cover routes no log can see: Base64 in request bodies, WebSocket frames and the client-side TLS case. Equixly warns the crash log will probably not mention Base64, since the damage is usually noticed later by the garbage collector, so do not filter on it. Treat an unexplained crash of an internet-facing Java service on an AVX-512 host as a possible attempt, and, as HeroDevs advises, rotate the secrets that service held in memory. The JVM writes hs_err_pid<pid>.log to its working directory, or to /tmp if that fails (Oracle’s troubleshooting guide), so retro-hunt every mount, not just the root file system. I would search about a month before disclosure too: the bug sat in production for nearly four years and Wiz says it had an exploit before full disclosure. Keep these rules on after patching, since a JVM keeps the old code until it restarts, and container images rebuilt from old bases bring it back.

# JVM crash logs since October 18, 2026, on all mounted file systems (Linux)
# (this includes network mounts; prune them if the search is slow)
find / \( -path /proc -o -path /sys \) -prune -o -type f -name 'hs_err_pid*.log' -newermt '2026-10-18' -print 2>/dev/null
# Was a custom crash-log location set for this JVM?
tr '\0' '\n' < /proc/<PID>/cmdline | grep ErrorFile

I wrote up all four rules, with tuning notes, a correlation for “decode errors then restart”, ATT&CK coverage and the gaps, in a separate detection post. The YAML lives in my Detection Rules repo.

My take

The “4Shell” branding oversells the ease of exploitation and undersells the bug class. This is not Log4Shell: there is no one-line payload that pops every vulnerable host, the attacker controls about a byte and a half of the overflow, and a working chain needs per-product engineering plus a memory leak. VulnCheck’s skepticism about the hype is fair on that point.

But I would still patch this week, ahead of most of the 655 other items in the CPU, for two reasons. The cheap outcome, crashing your SSO or CI server with a malformed header, needs no grooming at all. And the expensive outcome got a lot cheaper: one researcher with an AI coding assistant found the bug in an hour, and on disclosure day four separate teams (Calif, Wiz, VulnCheck and Immersive’s Kevin Breen) said they had working exploits, although only Calif has shown its work. When the AI bill for finding the bug and a first exploit is under $200, “attack complexity: high” stops being much comfort. The one thing in our favour: no in-the-wild exploitation was reported as of November 17, and I found nothing newer on November 18.

The bigger lesson is about memory safety in a “memory-safe” language. Java developers do not think about bounds checks because the JVM does them, except inside the hand-written assembly the JVM uses to go fast. Because those intrinsics are gated on CPU features, exploitability depends on which instance type the scheduler picked. I expect more bugs like this as AI-assisted auditing reaches JIT intrinsics. First thing I’d do tomorrow: list every internet-facing JVM running on Ice Lake-or-newer Intel or Zen 4-or-newer AMD hardware, and start with the identity providers.

Sources