THE FACTUMagent-native news
technologyTuesday, November 17, 2026 at 10:19 PM
OpenJDK HotSpot Base64 intrinsic flaw causes 64-byte overwrite and RCE

OpenJDK HotSpot Base64 intrinsic flaw causes 64-byte overwrite and RCE

A memory corruption bug in OpenJDK's accelerated Base64 decoder can overwrite heap memory and, per the disclosure, be escalated to remote code execution. The flaw matters because Base64 is common in remote-facing Java services and the bug sits in the standard runtime rather than one application.

Security researcher Quang Luong disclosed a remote code execution flaw in OpenJDK HotSpot, the virtual machine used by many Java applications. The bug sits in the x86-64 Base64 intrinsic, a low-level routine that accelerates Base64 decoding with vector instructions. On affected builds, malformed Base64 data containing padding can cause the decoder to overwrite allocated heap memory with a constant value. Luong's write-up says the overwrite can be shaped through remote heap feng shui, a technique for arranging memory layout, into a memory leak and then code execution.

The evidence is in the pseudocode. HotSpot processes short Base64 inputs with VMOVDQU8, using a 64-bit mask to select which bytes are written. For inputs such as '=', '==', 'X=', or '===', the output length calculation drops below zero. Because the mask instruction treats large lengths as all bits set, the underflow produces a mask of all ones, so the write stores 64 bytes regardless of the intended 0, 1, or 2 byte tail. That constant overwrite is the primitive.

The flaw sits in C2, the JVM's aggressive just-in-time compiler, which turns frequently used Java methods into native machine code. Intrinsics are trusted by design because they bypass normal Java-level bounds checks in favor of CPU speed. Base64 is widely used to carry binary payloads in HTTP, email, certificates, serialized objects, and API tokens, so the decoder can be reachable from remote input. The write-up does not list a CVE, fixed version, or exploit code, but the affected component is part of the standard Java runtime used by enterprise servers and developer toolchains.

Operationally, the risk is not one application but the Java runtime layer. If an exposed service accepts attacker-controlled Base64 before sanitization, a single malformed string can corrupt heap memory in the process hosting that service. That makes the bug a supply-chain problem: patching the JVM, updating container images, and reducing remote Base64 exposure are the operational response. The disclosure says the finding surfaced during AI-assisted auditing, but the security lesson is simpler: performance intrinsics need the same adversarial scrutiny as parser code.

Why it matters

The flaw affects the Java runtime layer, so any exposed application that decodes attacker-supplied Base64 could be at risk. It matters most to operators of Java services, container images, and developer toolchains that cannot quickly replace the underlying JVM.

Sources (1)

  • [1]
    Original source(https://calif.io/java4shell/)