Java4Shell: RCE in OpenJDK when processing Base64
Points and comments are a snapshot, not live.
A maliciously crafted Base64 string can trigger RCE on OpenJDK with AVX-512 VBMI.
Quang Luong discovered an out-of-bounds write in OpenJDK HotSpot's x86-64 Base64 intrinsic (C2 JIT). Malformed padding (`===`, `X=`, etc.) causes an underflow in mask calculation, writing 64 fixed bytes past the output buffer's end. By combining heap grooming (TLAB control, spray-and-pray), a length-overwrite primitive turns the fixed write into a controllable linear write, then into arbitrary read (JavaBleed) and code execution. Affects OpenJDK 17.0.6+ on Intel Ice Lake+ and AMD Zen 4+ CPUs. Mitigation: `-XX:-UseBASE64Intrinsics` or `-XX:UseAVX=2`. Patches released Nov 17.
What commenters are saying
Commenters confirm the bug lies in AVX-512 VBMI Base64 decoding assembly. Several provide reproducers and point to the OpenJDK fix commit (5177a70b). The consensus is that this is a serious but not trivial exploit: it requires specific heap layout and AVX-512 support. Workarounds (`-XX:UseAVX=2` or `-XX:-UseBASE64Intrinsics`) are suggested, with a caution that `UseAVX=2` fails on ARM. Some express concern about more bugs in hand-written JIT intrinsics, while others note that many production systems (e.g., on Graviton) are not vulnerable due to CPU requirements.