R163 · AI-built software and its verification › Security scanning for AI-written code

Java4Shell (CVE-2026-114938): when the CPU, not the image, decides exposure

Read the original

Authors Deepak Kumar (shared)

securityincident-response

Sources: Oracle Critical Security Patch Update Advisory, November 2026 (published 2026-11-17); Horizon3 vulnerability summary; a platform-engineering write-up by Deepak Kumar shared 2026-11-19. Reported by Quang Luong (Calif.io) and Albert Yang.

The bug

HotSpot replaces the Java loop in java.util.Base64 with a hand-written x86-64 AVX-512 intrinsic once the decode method runs hot. When handling the final partial block, the routine computes an output length from the block size and subtracts one byte per trailing =. A one-to-three-byte tail produces a negative length; the store mask built from it is read as full width, and the routine writes 62 or 63 bytes past the end of the destination array, corrupting the next heap object. The decoder still throws on the malformed input, but the corruption has already happened.

Why it is an operations problem, not just a patch

The vulnerable path runs only on x86-64 CPUs with AVX-512 VBMI (reported as Intel Xeon Ice Lake through Granite Rapids, AMD Zen 4 and newer). On Linux the check is avx512f, avx512bw, avx512vbmi and bmi2 all present in /proc/cpuinfo. ARM64 is unaffected. A container inherits its host's processor, so one image can be exploitable on one node pool and safe on the next. Image scanners that look only at the JDK version will report the same verdict for every replica; the real exposure is per node type.

Version confusion adds a second trap: builds patched in October are still affected. Fixed builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1 (Oracle also lists a Java 8 perf build). Affected OpenJDK ranges start at 17.0.6. Downstream distributions (Temurin, Corretto, Red Hat builds) and JREs bundled inside appliances and vendor images ship on their own schedules. Sources disagree on whether OpenJDK itself published an advisory, so confirm ranges against your distributor.

Response plan

  1. Inventory by JVM and by CPU. List every running JVM with its version and the processor it actually runs on, including CI runners and build agents, which decode a lot of untrusted Base64 (artifact metadata, tokens).

  2. Prioritise internet-facing identity, build and collaboration servers.

  3. Patch everywhere, including ARM nodes, since the same update carries other fixes.

  4. Restart every JVM. A new image changes nothing until the old pod or process is replaced.

  5. Stopgaps only where patching must wait, tested first:

    • -XX:-UseBASE64Intrinsics disables the vulnerable intrinsic and costs decode performance.

    • -XX:UseAVX=2 keeps the JVM off AVX-512 entirely, can slow other vectorised code, and prevents an ARM JVM from starting, so it must not be applied fleet-wide blindly.

    • Verify with jcmd <PID> VM.flags -all. Neither flag is a vendor-supported workaround.

Failure modes

Review checklist

Connections

See R163 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.