Java4Shell: RCE in OpenJDK when processing Base64 calif.io · 312 points · 79 com...
HN Best 30 @best30
Java4Shell: RCE in OpenJDK when processing Base64 calif.io · 312 points · 79 comments · HN thread
TL;DR Calif disclosed Java4Shell (CVE-2026-114938), a heap out-of-bounds write in OpenJDK's AVX-512 VBMI Base64 decoder intrinsic, which they say can leak heap memory and lead to remote code execution in widely deployed Java applications. The bug triggers with input like 64 A's followed by '=' on affected x86-64 CPUs; Calif says exploits require bespoke per-target work and withholds product-specific chains until patches are widely deployed.
- The bug is in hand-written x86-64 assembly for the Base64 intrinsic: a padding '=' makes the output length underflow, so a 64-byte masked write lands past a 50-byte array on the 65-byte trigger input.
- Calif reports RCE in default configs of Keycloak, Jira, Confluence, Artifactory, Jenkins, PingFederate, Kafka, Solr, Elasticsearch, Gerrit and Spinnaker, with the lists described as non-exhaustive.
- Affected: OpenJDK 17.0.6 and later and distributions built from it (Corretto, Temurin, Zulu, GraalVM, Oracle Java SE, among others); Oracle lists 8u511b33-perf, 17.0.21, 21.0.13, 25.0.5 and 27.0.1 as vulnerable. ARM64 is not affected.
- Requires an x86-64 CPU with AVX-512 VBMI (Intel Ice Lake or newer Xeon, AMD Zen 4 or newer). Suggested mitigations include -XX:-UseBASE64Intrinsics or -XX:UseAVX=2.
- Calif says the discovery took about an hour with Codex-style AI assistance and the first exploit two more hours, under $200 in tokens, but that exploitation needs heap grooming tailored to each target and remote timing work.
- The authors argue for removing unneeded code ('vibe-uncoding') to reduce attack surface, a point that frames the Base64 optimization as an unnecessary risk for most applications.
Discussion The thread mixes technical triage with alarm about the broader threat. Early commenters shared mitigation flags, detection scripts and a patch commit, and debated whether AVX-512-only exposure makes the issue less urgent. Many questioned how common AVX-512 hardware is in server fleets, while others warned that CPUs and VMs can change under a deployment. A substantial strand criticized the write-up's style, suspected LLM authorship, and questioned hand-written assembly in standard libraries. The mood is serious but split between urgency and skepticism about hype.
- Patch the JDK now; hardware exposure can change (many): Several commenters argue that even if current machines lack AVX-512, nodes can be swapped or migrated to such hardware, so updating the JDK should not wait. Ops engineers note that Kubernetes node types or cloud instance families can change without much notice.
- Mitigate with JVM flags or proxy buffering (many): Users shared workarounds such as -XX:-UseBASE64Intrinsics, -XX:UseAVX=2 and buffering request bodies at nginx, noting that some grooming profiles need streaming and that Elasticsearch is not stopped by buffering. A few cautioned that UseAVX=2 fails on ARM and that the flags were not yet confirmed by Oracle or Calif.
- Risk is serious; expect attacks on critical systems (some): Commenters see this as a major event given Java's presence in banking and enterprise systems, and expect organizations with slow patch cycles to be exposed. Some frame it as an 'interesting times' moment that could force modernization.
- Overhyped; less severe than Log4Shell (some): Others argue the attack is complex, needs specific AVX-512 hardware, exact input lengths and heap layout, so mass exploitation is unlikely in the short term. They note Log4Shell set a much lower bar for exploitation.
- Hand-written assembly and LLM-written code are risky (some): Several commenters say standard libraries should not contain hand-tuned assembly for scalar or niche paths, that the optimization is not worth its risk, and that fuzzing or bounds checking of such code should be standard. Some also suspected the write-up itself was LLM-generated and found its shorthand hard to read.
- Concern about AI-assisted vulnerability discovery (a few): A few posters tie the find to AI tools, noting a commenter who reproduced a canary-based overrun with GLM and questioning whether AI-written code could produce similar bugs. Others remark that AI-found bugs make mass discovery more plausible.
Links from the comments
- Semgrep's free detection scripts that check the five conditions for exposure.
- The OpenJDK commit that fixes the VBMI Base64 intrinsic.
- Upwind summary of what is known about the vulnerability.
- Amazon Corretto release notes mentioning the hotspot/compiler fix.
- CIRCL tracker of sightings and correlations for the CVE.