Heap-Based Buffer Overflow Vulnerability in HotSpot JVM Base64 Decoder (Java4Shell - CVE-2026-114938)
A critical memory corruption vulnerability, designated as CVE-2026-114938 and colloquially dubbed "Java4Shell", has been uncovered in OpenJDK, Oracle Java SE, Oracle GraalVM for JDK, and related runtime distributions. The flaw is rooted in the optimized, hardware-accelerated SIMD Base64 decoding routine within the HotSpot Java Virtual Machine (JVM). With a CVSS v3.1 severity score of 8.1, the vulnerability allows an unauthenticated remote attacker who can supply crafted Base6...
Description
Technical context and vulnerability details
The Java platform provides built-in high-performance utilities for data encoding and decoding under java.util.Base64. In modern Java versions (specifically OpenJDK 17.0.6 and later), HotSpot JVM incorporates hardware-accelerated intrinsic routines leveraging advanced vector instructions (such as AVX-512 VBMI on x86-64 architectures) to accelerate bulk Base64 decoding operations.
Under specific boundary conditions, the vectorized decoding loop fails to properly validate destination buffer boundaries when processing non-standard or malformed Base64 streams containing unexpected padding or truncated chunks. This calculation defect permits the intrinsic decoder to write bytes beyond the allocated heap buffer in native JVM memory space.
Because Base64 decoding is widely used across standard web protocols, JSON Web Tokens (JWT), HTTP basic authentication, XML signatures, email attachments, and API payloads, vulnerable applications that process untrusted network input can be targeted remotely without prior authentication.
Exploitation primarily affects x86-64 server systems equipped with CPUs supporting AVX-512 vector extensions. Systems running on ARM64 architectures or deployments where vector intrinsics are disabled are significantly less susceptible to memory corruption, though application crashes may still occur.
Potential Risks & Impact
Potential consequences upon exploitation
- Remote heap memory corruption within the HotSpot JVM process;
- Denial of service (DoS) through application and JVM termination;
- Potential remote code execution (RCE) with the privileges of the running Java service;
- Arbitrary modification or leakage of adjacent heap-allocated application data.
Affected systems
Products, components and targeted versions
- OpenJDK versions 17.0.6 through unpatched 17.x, 21.x, and 23.x releases running on x86-64 hardware with AVX-512 extensions;
- Oracle Java SE versions 17.x, 21.x, and 23.x;
- Oracle GraalVM for JDK and GraalVM Enterprise Edition;
- Enterprise Linux distributions (RHEL, Debian, Ubuntu, SUSE, Amazon Linux) distributing affected OpenJDK packages.
Recommended Remediations & Actions
Immediate actions and recommended mitigations
- Immediately upgrade OpenJDK, Oracle Java SE, and GraalVM installations to the latest vendor patch releases;
- For enterprise environments where immediate upgrades cannot be deployed, consider disabling the vulnerable intrinsic via JVM startup flag:
-XX:-UseBASE64Intrinsics; - Deploy Web Application Firewall (WAF) inspection rules to inspect and sanitize malformed or oversized Base64 payloads at perimeter gateways;
- Restrict exposure of administrative and internal Java endpoints to trusted networks;
- Monitor application logs and system crash dumps (hs_err_pid files) for unexpected segmentation faults in JVM Base64 intrinsic routines.
Sources & External Links
Vendor security advisories and documentation
Advisory Specifications
CSIRT Emergency Response
Is your organization affected or do you suspect an incident? Our security experts are available to assist.
Report an incidentGet our alerts by email
Subscribe to receive our security alert bulletins and Iservices news straight to your inbox.