Skip to main content

Java4Shell: The OpenJDK RCE Flaw Found With OpenAI Codex in an Hour

Java4Shell (CVE-2026-114938) is a heap overflow in OpenJDK's AVX-512 accelerated Base64 decoder, affecting Java 17.0.6 and later, 21, 25 and 27 on x86-64 CPUs with AVX-512 VBMI. Calif found it with OpenAI's Codex in about an hour for under $200 in tokens. Oracle patched it on 17 November 2026; update Java, or temporarily run with -XX:-UseBASE64Intrinsics.

On this page

What Java4Shell is

Java4Shell, tracked as CVE-2026-114938, is a memory corruption bug in the hardware accelerated Base64 decoder that ships with OpenJDK. On affected builds, a short malformed Base64 string, such as 64 "A" characters followed by a single "=", makes the decoder write past the end of a heap buffer: Calif says the decoder allocates 50 bytes and writes 64. Calif says a remote attacker with no credentials can use this to overwrite heap memory.

The bug only triggers on x86-64 processors with AVX-512 VBMI support, which includes Intel Xeon chips from Ice Lake onwards and AMD Zen 4 or newer; ARM64 machines are not affected. Because Base64 sits under authentication headers, tokens and file uploads, the attack surface is wide. In default configurations, Calif reports pre-auth code execution in Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins and PingFederate, and post-auth code execution in Kafka, Solr and Elasticsearch, while stressing that there is no universal exploit.

How an AI coding agent found it

The discovery is why Java4Shell is getting attention beyond Java shops. Calif says its researcher Quang Luong found the flaw in about an hour of auditing OpenJDK with OpenAI's Codex, for less than $200 in tokens. Calif says the first working exploit took two more hours, and that AI agents then built most of the later exploit chains almost on their own.

That is a self-reported timeline, and Calif has not published its prompts. It still fits a pattern this year: frontier coding agents are now finding serious bugs in mature, heavily reviewed code for the price of a few hundred dollars of compute. Defenders get the same capability, but so does anyone else with an API key.

Severity, patches and affected versions

Scores differ. Calif rates the bug 9.2 under CVSS 4.0, while Oracle gives it 8.1 under CVSS 3.1, calling it remotely exploitable without authentication but with high attack complexity. The OpenJDK advisory lists Java 17, 21, 25 and 27 as affected, and standard Java 8 and 11 are not listed.

Oracle fixed the flaw on 17 November 2026 in its November Critical Security Patch Update. Tenable lists the fixed Oracle builds as 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, plus 8u513-perf for the Java 8 Enterprise Performance Pack. Other distributions built from OpenJDK, including Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu and Red Hat OpenJDK, are also affected and ship fixes on their own schedules.

Exploitation status and what to do now

As of 17 and 18 November, no exploitation in the wild had been reported, and the flaw was not in CISA's Known Exploited Vulnerabilities catalog. CISA has still called for immediate patching, starting with internet-facing systems. Calif published a proof of concept that shows the memory corruption but has not released its weaponised exploits, and security firms that built their own working exploits have kept them private.

The order of work is simple:

  • Update every Java runtime to a fixed build, including Java bundled inside appliances and vendor products.
  • If you cannot patch yet, restart affected JVMs with -XX:-UseBASE64Intrinsics, or -XX:UseAVX=2 on x86-64 only, and treat both as temporary.
  • Prioritise exposed identity, CI and collaboration servers such as Keycloak, Jenkins and Confluence.

For anyone self-hosting AI tools, note that many model gateways, vector databases and search backends run on the JVM. A local stack is only private if its runtime is patched.

CuriousLM runs supported AI models locally on your device. Try CuriousLM.