CVE-2026-114938 “Java4Shell” — impact on moqui-framework and recommended mitigations
TL;DR
- Java4Shell is a JDK bug, not a Moqui bug. It’s a heap buffer overflow in the HotSpot AVX-512 intrinsic for java.util.Base64 decoding. No Moqui code change can fully fix it — the memory corruption happens inside the decode, before Java throws its IllegalArgumentException, so input validation cannot stop it.
- The real fix is a JDK update (or a one-line JVM flag that disables the vulnerable intrinsic). More below.
- Good news for Moqui specifically: the most obvious pre-auth vector — HTTP Basic auth — is NOT affected, because Moqui decodes the Authorization header with Groovy’s String.decodeBase64(), which is a hand-rolled decoder that never touches the JDK intrinsic. I verified this against the bytecode of Groovy 5.1.1.
- Exposure requires a specific CPU. Only x86-64 with AVX-512 VBMI (Intel Ice Lake / Sapphire-Granite Rapids, AMD Zen 4+). ARM (Graviton/Ampere), older Xeons, and most desktop Intel are not affected at all.
The vulnerability in brief
┌────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │ │
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ CVE │ CVE-2026-114938 (“Java4Shell”), disclosed 2026-11-17 by Calif │
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Severity │ CVSS 3.1 8.1 (OpenJDK) / CVSS 4.0 9.2 (Calif) │
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Root cause │ Integer underflow in the x86-64 AVX-512 decodeBlock intrinsic; a short, malformed, padded Base64 input makes the output-length go negative and the decoder writes │
│ │ ~62–63 bytes past the output array │
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Impact │ Heap corruption → info-leak (keys/tokens in heap), JVM crash (DoS), and demonstrated RCE in several products │
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Affected │ OpenJDK 17.0.6 → 17.0.21, 21 → 21.0.13, 25 → 25.0.5, 27 → 27.0.1 (all vendors: Temurin, Corretto, Zulu, Liberica, MS, Red Hat, SapMachine, GraalVM). Not OpenJDK │
│ JDK │ 8/11 (no intrinsic) — except Oracle’s 8u511-perf pack │
├────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Fixed in │ 17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 (Oracle/OpenJDK release of 2026-11-17); Corretto 17.0.21.1.2; others on their own schedules │
└────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Two independent preconditions, both required:
- Vulnerable JDK (one of the above, unpatched), and
- CPU with AVX-512 VBMI. Check on Linux: grep -c avx512vbmi /proc/cpuinfo (>0 = in scope).
Also note the intrinsic only runs once the decode method is JIT/C2-compiled (a hot path), and only the basic and URL decoders are affected — the MIME decoder is not.
▎ On the dev box I ran this on: openjdk 21.0.13.0.3 + avx512vbmi present → exactly in scope. Worth stating because a lot of Moqui production runs on exactly this class of hardware.
Moqui attack-surface analysis
I disassembled every Base64 decode call site in the framework and in the shipped moqui.war dependency jars. Classifying by whether the call reaches the vulnerable JDK intrinsic (basic/URL java.util.Base64.Decoder.decode) and whether the input is attacker-controlled:
NOT affected (reassuring)
- HTTP Basic auth — UserFacadeImpl.groovy uses Groovy decodeBase64() → own decoder, no intrinsic. This is the big one; the headline pre-auth vector for most products does not apply to Moqui.
- Multipart/MIME uploads — commons-fileupload2 MimeUtils uses getMimeDecoder() → MIME decoder is not vulnerable.
- commons-codec (on the classpath) — has its own decoder, intrinsic-free.
- SimpleSigner / QZ signing — decodes a local PEM key file, not attacker input.
- Jetty BasicAuthenticator, Jetty digest/SPNEGO — present in jars but Moqui does its own auth; not wired in by default.
Affected path + attacker-reachable → prioritize
- Shiro rememberMe cookie. DefaultWebSecurityManager (which Moqui’s MoquiWebSecurityManager extends without disabling rememberMe) instantiates a CookieRememberMeManager. Its decode chain is shiro-lang Base64.decode(String) → java.util.Base64.getDecoder() → vulnerable intrinsic, and the cookie value is attacker-supplied and read during Subject creation (i.e. effectively pre-auth). This is the most important dependency surface to confirm on your deployment. (The cookie is AES-decrypted after the Base64 decode, so encryption doesn’t protect the vulnerable step.)
- A2A gateway (the llm-client branch, in development). A2ATypes.requireBase64() decodes message-part raw content via Base64.decoder / Base64.urlDecoder, and A2ATaskStore url-decodes pagination tokens — all the vulnerable path, on attacker-supplied wire data. The A2A services are authenticate=“true” allow-remote=“false”, so it’s authenticated and not a raw remote service call, but since this is new code it’s the surface most worth hardening before release.
Affected path but limited reach (admin/trusted/local)
- Entity field decryption (EntityJavaUtil.java, URL decoder) — input is ciphertext already stored in the DB, not a direct network-facing string.
- Entity data load / DataImport.xml (basic + URL decoder) — admin/import tooling.
- snakeyaml !!binary (getDecoder) — only reachable if untrusted YAML with binary tags is parsed; Moqui’s snakeyaml use is in RestSchemaUtil (schema generation), not an untrusted-input path.
- SubEtha SMTP AUTH LOGIN/PLAIN (getDecoder) — disabled by default (tool-factory … disabled=“true”).
Recommended mitigations (in order)
-
Patch the JDK — the only complete fix. Move to a fixed build (21.0.13.1 / 17.0.21.1 / 25.0.5.1 / 27.0.1.1 or your vendor’s equivalent). For containers, rebuild on an updated base image. Remember a running JVM keeps the old code in memory — confirm the live runtime with jcmd VM.version, not just the on-disk install.
-
If you can’t patch immediately — the JVM flag (this is the “something other than a JDK update” you asked about). Add to JAVA_OPTS / the Moqui start script / Dockerfile:
-XX:-UseBASE64Intrinsics
This disables only the vulnerable fast Base64 path; Java falls back to the scalar decoder. Low blast radius, no API change, effective, reversible. Confirm it took:
java -XX:-UseBASE64Intrinsics -XX:+PrintFlagsFinal -version | grep UseBASE64Intrinsics
(Broader alternative: -XX:UseAVX=2 disables all AVX-512 — bigger perf cost on crypto/vector code, and x86-only: an ARM JVM won’t start with it.)
-
Know which of your hosts are even in scope. Run grep -c avx512vbmi /proc/cpuinfo on each. ARM deployments (AWS Graviton, Ampere) and older/desktop x86 are not vulnerable and need no emergency action — useful for triaging a fleet.
-
Honest note on code-level mitigation. You cannot defend this in application code with input validation: the overflow occurs during decode, before the exception, and the triggering input is tiny so size limits don’t help (this is also CISA’s and the researchers’ stated conclusion). The flag in #2 is the “config change instead of JDK update,” not any Groovy/service change.
-
One targeted code hardening that is worth it (defense in depth for the new A2A code). Moqui already ships two intrinsic-free decoders — Groovy’s decodeBase64() and commons-codec Base64. For the attacker-facing A2A decode paths (A2ATypes.requireBase64, A2ATaskStore tokens), routing through commons-codec instead of java.util.Base64 would make that surface immune regardless of JVM version or flag. This is small, localized to the llm-client branch before it ships, and doesn’t help the rest of the framework — so it’s a complement to the JDK update, not a substitute.
Suggested forum guidance to users
▎ If you run Moqui on recent x86-64 server CPUs (Intel Ice Lake+ / AMD Zen 4+) on JDK 17.0.6+/21/25/27, add -XX:-UseBASE64Intrinsics to your JAVA_OPTS now and schedule a JDK patch to 21.0.13.1 (or your line’s fixed build). ARM and older-x86 deployments are not affected. Moqui’s HTTP Basic auth is not affected; the surface to watch is the Shiro rememberMe cookie and, for anyone tracking the llm-client branch, the A2A message gateway.
Sources:
- Calif — Java4Shell: Write once, RCE everywhere (Java4Shell: Write once, RCE everywhere)
- Equixly — CVE-2026-114938 pre-auth heap overflow in Java 17, 21, 25 (CVE-2026-114938: Pre-auth heap overflow in Java 17, 21, 25, and 27 | Equixly)
- Qualys — How to Find, Mitigate, and Patch the Critical Java4Shell Flaw (https://blog.qualys.com/vulnerabilities-threat-research/2026/11/17/how-to-find-mitigate-and-patch-the-critical-java4shell-flaw-cve-2026-114938-now)
- Orca Security (Java4Shell CVE-2026-114938: Affected Versions & Mitigation| Orca Security) · Tenable FAQ (Java4Shell (CVE-2026-114938): OpenJDK RCE Vulnerability FAQ) · Semgrep (Java4Shell: Critical OpenJDK Base64 RCE (CVE-2026-114938) | Semgrep)
A note on what happened mid-session: a safety classifier halted an earlier turn when I started to create a proof-of-concept trigger file. I’ve deliberately kept this analysis to static classpath inspection with no exploit строки, which is all that’s needed for the write-up.