tencent cloud

【Security Advisory】OpenJDK "Java4Shell" Memory Corruption Remote Code Execution Vulnerability (CVE-2026-114938)
Dear Tencent Cloud User,

Summary
The Tencent Cloud Security Center has detected that OpenJDK has been disclosed to contain a memory corruption vulnerability leading to remote code execution, tracked as CVE-2026-114938 and codenamed "Java4Shell." It can allow an unauthenticated remote attacker to submit specially crafted malformed input to the Base64 decoder, triggering an out-of-bounds heap write and thereby causing memory disclosure or remote code execution.

To avoid your business being affected, Tencent Cloud Security recommends that you promptly conduct a security self-assessment and, if within the affected scope, promptly apply updates and fixes to prevent intrusion by external attackers.

Technical Details
OpenJDK (Open Java Development Kit) is the free and open-source implementation of the Java Platform, Standard Edition (Java SE).

In the x86-64 Base64 decoder intrinsic of OpenJDK 17.0.6 and later, a flaw exists in the calculation of the output length when processing trailing input containing padding characters: when the input is 64 'A' characters followed by a single '=' (65 bytes in total), processing the padding character causes output_len to underflow to a negative value, after which the bzhiq instruction makes output_mask all 1s (-1u64). When evmovdqub (an AVX-512 instruction) performs the write, the all-1s mask results in a full 64-byte write, whereas the actually allocated result buffer is only 50 bytes, thereby causing an out-of-bounds write starting at offset 48. An attacker can exploit this fixed-value out-of-bounds write to overwrite the length field of an adjacent object, converting it into a controllable linear write primitive, and combined with heap layout control, disclose heap memory and ultimately achieve remote code execution.

Note: The impact scope of this vulnerability is extremely broad. Under default configurations, remote code execution can be achieved in numerous widely deployed Java applications. Among them, applications that can trigger RCE without authentication include Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, and PingFederate; applications that can trigger RCE after authentication include Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit, and Spinnaker. In addition, sample applications built on commonly used frameworks such as Apache Struts and Spring Boot are also exploitable, and routine features such as authentication and file upload may also expose vulnerable Base64 decoders, making the potential impact far exceed the products tested above. Notably, even a Java program that provides no external services may be attacked on the client side as long as it initiates a TLS connection to a malicious server.

Risk level
High

Vulnerability Risks
Exploitation of this vulnerability by an unauthenticated remote attacker can lead to Java heap memory disclosure (potentially containing sensitive information such as PII, private keys, and tokens), and can further achieve remote code execution, resulting in complete compromise of the target server.

Affected Products and Versions
OpenJDK >= 17.0.6
Oracle Java SE 8u511b33-perf
Oracle Java SE 17.0.21.0.3
Oracle Java SE 21.0.13.0.3
Oracle Java SE 25.0.5.0.3
Oracle Java SE 27.0.1.0.3
Oracle GraalVM for JDK 17.0.21.0.3
Oracle GraalVM for JDK 21.0.13.0.3
Oracle GraalVM Enterprise Edition 21.3.20.0.3

Secure Products and Versions
The official security patches released by the vendor.

Remediation & Action Required
1. The official patch and fixed versions have been released. Please assess whether your business is affected and upgrade to a secure version.https://www.oracle.com/security-alerts/cspunov2026.html
2. Mitigation measures:
(1) On x86-64 hosts, disable the hardware-accelerated Base64 encoding/decoding via the startup parameter -XX:-UseBASE64Intrinsics, or disable AVX-512 using -XX:UseAVX=2 (note: this parameter is not supported on ARM platforms and will cause startup failure);
(2) Check whether the CPU supports the AVX-512 VBMI instruction set: grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'. The output must contain all four flags;(3) Evaluate the usage scenarios of Base64 decoding in the application and avoid processing untrusted input in security-sensitive paths.

[Note]: It is recommended that you back up your data before upgrading to avoid any unexpected issues.

Vulnerability Reference