# Java4Shell: RCE in OpenJDK when processing Base64

- HackerByte page: <https://hackerbyte.net/en/stories/remote-code-execution-rce-vulnerability-in-openjdk-when-processing-base64-50538240>
- Original source: <https://calif.io/java4shell/>
- Hacker News discussion: <https://news.ycombinator.com/item?id=50538240>
- Submitted to Hacker News: 2026-11-17T21:11:28.000Z

Remote Code Execution \(RCE\) vulnerability in OpenJDK when processing Base64.

## AI-generated summary

A critical vulnerability named Java4Shell has been discovered in OpenJDK's x86\-64 Base64 intrinsic, allowing for Remote Code Execution \(RCE\). The issue arises from a miscalculation in the intrinsic's handling of padded Base64 data, leading to an out\-of\-bounds write on the heap. Exploitation involves heap feng shui techniques to control memory layout and escalate the overwrite into a heap leak and eventual RCE.

## Key points

- Vulnerability in OpenJDK's x86\-64 Base64 intrinsic leads to RCE.
- Malformed Base64 input causes an out\-of\-bounds heap write.
- Exploitation requires 'Heap Feng Shui' to control memory allocation.
- The bug can be used to achieve heap leaks and arbitrary code execution.
- Affects OpenJDK 17.0.6\+ and specific CPU architectures \(x86\-64 with AVX\-512 VBMI\).
