deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Trivially triggered OpenJDK Base64 overflow threatens widely deployed Java servers

A one-line Base64 string can push OpenJDK's AVX-512 decoder 62 bytes past a heap array. Fixes shipped on November 17, and CISA is urging immediate patching.

Trivially triggered OpenJDK Base64 overflow threatens widely deployed Java servers

A padding edge case in hand-written assembly

The flaw, tracked as CVE-2026-114938 and nicknamed "Java4Shell", sits in the AVX-512 VBMI assembly routine that HotSpot substitutes for Base64 decoding once the optimizing JIT compiler has compiled a decode call site. According to a write-up on dev.to, the security research group Calif found that a 65-character input — 64 letter A's followed by a padding character — makes the routine write 64 bytes into a 50-byte result array, leaving 62 bytes beyond the end. The JVM does reject the malformed input, but only after the out-of-bounds store has already happened.

The overflow stems from how the routine sizes its final store. Calif's analysis, as relayed by dev.to, says the assembly computes an output length of minus one for a one-character padded tail, then builds a write mask with an instruction that fails to clip values of 64 or above. The resulting all-ones mask lets the full 64-byte store land starting at offset 48 of the 50-byte buffer, corrupting whatever object the heap allocator placed next to it. On older OpenJDK 17 builds the trigger reportedly requires 128 A's instead of 64.

Which systems are exposed

Not every Java deployment is in range. Per the dev.to report, reaching the broken path requires OpenJDK 17.0.6 or newer on an x86-64 CPU with AVX-512 VBMI — Intel Ice Lake or later, and AMD Zen 4 or later. ARM64 machines are unaffected, and standard Java 8 and 11 builds fall outside the CVE. Oracle's advisory, dated November 17, lists versions 17, 21, 25 and 27 as affected and scores the issue 8.1 on CVSS 3.1; Calif argues for 9.2 under CVSS 4.0.

The AI-assisted discovery and the exploitation claims

Calif credits researcher Quang Luong, who says he asked the Codex coding agent to audit the JIT compiler, intrinsics, widely used APIs and cryptography; after mostly unusable output, the agent flagged the Base64 decoder. Calif says the bug took an hour to locate and two more to weaponize, for under $200 in tokens — though the dev.to author notes none of this account has been independently verified.

The exploitation results also rest on Calif's own testing. The group says it reached code execution in default configurations of Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate without a login, and in Kafka brokers, Solr, Elasticsearch, Gerrit and Spinnaker after authenticating. The technique reportedly aims the constant spill at a neighbouring array's length field, turning a fixed overwrite into a bounded chosen-value write and enabling a heap disclosure that Calif compares to Heartbleed. There is, however, no single exploit that works everywhere: each target needs its own route to the decoder, a way to read results back, a workable heap layout and an application-specific final step, and the chains are sensitive to network timing. No vendor advisory the dev.to author checked confirms the product-level results, and the security firm Hadrian — which reproduced crashes in Spring Security and Tomcat login checks plus code execution in one lab service — cautions that reliable exploitation is very hard to reproduce.

Fixes are out, and a flag works everywhere else

OpenJDK and Oracle published fixes on November 17. The public patch, per dev.to, is a four-line change on the November security branch that routes padded tails shorter than one complete block back to the Java implementation instead of the assembly path. Amazon lists Corretto 17, 21 and 25 as fixed the same day, Adoptium says Temurin builds are being published as testing completes, and Red Hat says it is expediting its own fixes while stating that ARM64 and non-VBMI x86-64 systems are not known to be affected.

CISA issued an alert on November 17 urging immediate patching and suggesting Base64 input validation at the application boundary plus limits on unauthenticated access as temporary controls. According to dev.to's check on November 18, the CVE was not yet on CISA's Known Exploited Vulnerabilities catalog. For deployments that cannot patch right away, the JVM flag -XX:-UseBASE64Intrinsics disables the intrinsics path everywhere, trading some decode throughput for safety.

Why it matters

Base64 decoding is close to universal in Java servers — authentication headers, file uploads and network protocols all pass through it — so memory corruption in the decoder itself has unusually broad reach. The trigger costs an attacker almost nothing to send, the affected CPUs are precisely the modern server fleet, and patches already exist from multiple distributors, which makes patching now the obvious move. The story is also a data point in the debate over AI-assisted security research: if Calif's account holds up, a few hundred dollars of agent time surfaced a serious flaw that years of manual auditing had missed.

  • #openjdk
  • #java
  • #security
  • #vulnerability
  • #memory-corruption

Related posts