Grafy News
Try Grafy free

Java4Shell: Critical OpenJDK Base64 RCE vulnerability disclosed

A new CVE‑2026‑114938 in OpenJDK's Base64 decoder allows remote code execution, affecting major Java products.

Illustration for the news story: Java4Shell: Critical OpenJDK Base64 RCE vulnerability disclosedSource: Hacker News — front page

What is Java4Shell and why it matters

The security community has been alerted to Java4Shell (CVE‑2026‑114938), a memory‑corruption bug in OpenJDK's Base64 decoder that can be triggered by an unauthenticated attacker to achieve remote code execution (RCE). With a CVSS v4.0 score of 9.2 (critical), the flaw impacts the most widely deployed Java runtime and, by extension, a large swath of enterprise software that relies on Java for core services.

Demo video
Embedded video from the source story.

How the Base64 decoder bug works

OpenJDK accelerates Base64 decoding on modern x86‑64 CPUs by using AVX‑512 VBMI instructions. The optimized routine processes data in 64‑byte vectors and calculates a mask that determines which bytes are written. When the input ends with a single padding character (=) after 64 normal characters, the routine miscomputes the output length, producing a negative value. This underflow leads to an output mask of -1, causing the vector write to overwrite 64 bytes beyond the allocated buffer.

The overflow can corrupt adjacent heap objects, allowing an attacker to leak memory (similar to Heartbleed) or, with further heap‑feng‑shui, execute arbitrary code. The minimal trigger is:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=

On older OpenJDK 17 builds the same effect requires 128 A characters followed by =.

Demo video of the exploit

Which products are vulnerable

The researchers demonstrated pre‑authentication RCE against several high‑profile Java services running with default configurations, including:

  • Keycloak
  • Atlassian Jira
  • Atlassian Confluence
  • JFrog Artifactory
  • Jenkins
  • PingFederate

Post‑authentication RCE was shown in:

  • Apache Kafka Broker
  • Apache Solr
  • Elasticsearch
  • Gerrit
  • Spinnaker

The list is not exhaustive; any Java application that decodes Base64 data—especially in authentication, file‑upload, or network‑message paths—could be exploitable. A client‑side proof‑of‑concept also showed that a Java program establishing a TLS connection to a malicious server can be compromised, even without exposing a network service.

How the vulnerability was discovered with AI

According to the source, the lead researcher Quang Luong used an AI‑assisted workflow to locate the flaw. After prompting an LLM (referred to as Codex) to examine low‑level components such as JIT intrinsics and native assembly, the model highlighted a suspicious path in the Base64 intrinsic. Luong spent roughly one hour identifying the bug and two additional hours crafting a functional exploit. The total token cost for the AI‑driven investigation was reported to be under $200.

The team describes the approach as a “centaur hacker”—a collaboration where human insight guides AI‑generated code and analysis, while the AI accelerates repetitive or pattern‑matching tasks. This hybrid method allowed rapid exploitation despite the lack of a universal chain; each target required tailored heap‑layout manipulation.

Mitigation steps and recommendations

The original advisory outlines a short checklist for operators:

  1. Identify affected OpenJDK versions – the bug is present in builds that include the AVX‑512‑based Base64 intrinsic (e.g., OpenJDK 17 and later on x86‑64).
  2. Upgrade or patch – apply vendor‑supplied patches that disable the optimized intrinsic or replace the decoder with a safe implementation.
  3. Disable AVX‑512 optimizations – if a patch is unavailable, configure the JVM to avoid the native intrinsic (e.g., -XX:UseAVX=0).
  4. Audit Base64 usage – review code paths that accept untrusted Base64 data, especially in authentication tokens, file‑upload handlers, and inter‑service messages.
  5. Employ runtime hardening – enable stricter memory safety checks (e.g., -XX:+UseCompressedOops) and consider container‑level sandboxing to limit the impact of a potential breach.

Organizations running the listed products should prioritize patching, as the exploit works against default configurations and does not require prior authentication.

Using Grafy to analyze or remediate the issue

Developers and security teams can leverage Grafy Code to reproduce the bug in a controlled environment. The AI‑powered coding studio lets you spin up a sandboxed OpenJDK instance, modify the Base64 intrinsic, and test payloads without risking production systems. Additionally, Grafy Reader can ingest the full technical write‑up (PDF or HTML) and let you query specific sections—useful for quickly extracting mitigation scripts or understanding the heap‑feng‑shui steps described by the researchers.

For a hands‑on exploration, you might:

  • Clone the vulnerable OpenJDK source via Grafy Code, apply a custom patch that adds bounds‑checking, and run the demo payload.
  • Use Grafy Reader to ask the AI to summarize the heap‑layout technique and generate a checklist tailored to your Java stack.

These workflows illustrate how Grafy’s multimodal tools can turn a high‑severity vulnerability into a learning exercise and a concrete remediation path.

Frequently asked questions

Frequently asked questions

What is the exact input that triggers the OpenJDK Base64 overflow?

The overflow occurs when the decoder receives 64 consecutive A characters followed by a single = padding byte (or 128 As and = on older OpenJDK 17 builds). This malformed string causes the internal mask to become -1, leading to a 64‑byte out‑of‑bounds write.

Which Java applications have been shown to be exploitable without authentication?

Pre‑authentication exploits were demonstrated against Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, and PingFederate. These products are widely deployed and use the default Base64 decoder in code paths that accept external data.

How can I test whether my own Java service is vulnerable?

Deploy a sandboxed JVM matching your production version, feed the trigger payload (AAAAAAAA…=) to any API that decodes Base64, and monitor for crashes or memory‑corruption logs. Grafy Code can automate this test by generating a minimal Java program that invokes java.util.Base64.getDecoder().decode() with the malicious string.


Source: Hacker News front page via calif.io (https://calif.io/java4shell/)


Source: Hacker News — front page — Java4Shell: RCE in OpenJDK when processing Base64