A Java bug found in an hour: how did Codex catch Java4Shell in OpenJDK?
Security firm Calif used OpenAI's Codex to find a critical flaw in OpenJDK's Base64 decoder. Fixes are out; here is who is affected, how to check, and the interim flag for systems that cannot update yet.
Java runs quietly on countless servers, from bank back offices to company intranets. On November 17, a critical security update shipped for OpenJDK, the most widely used Java runtime, and the story of how the bug was found is as striking as the bug itself. Security firm Calif, which found it, says in its write-up that OpenAI's coding tool Codex located the flaw in about an hour. The bug has been named "Java4Shell" and is tracked as CVE-2026-114938.
The core of it: on Java 17 and later running on certain processors, a specialised piece of code that speeds up Base64 decoding can write past the end of a memory buffer. Fixes are out, and the steps for administrators are clear; they are laid out below.
Where exactly is the bug?
Base64 is an old, ubiquitous way to turn binary data such as images or keys into plain text. It is decoded constantly in the background when you log in to a site, upload a file or open a secure connection. To speed this up, Java uses hand-written machine code built on the AVX-512 VBMI instructions in newer Intel and AMD processors. According to Calif, for inputs shorter than 64 bytes this code subtracts padding characters from the output length without a lower bound. When the length goes negative, the code writes 64 bytes into a 50-byte buffer and runs past its end. Java rejects the input afterwards, but neighbouring memory has already been corrupted.
Red Hat's security page describes it the same way: a memory corruption flaw in OpenJDK 17.0.6 and later, affecting x86-64 systems whose CPU supports AVX-512 VBMI. According to Calif, ARM64 systems are not affected; on the processor side, Intel Xeon Ice Lake and newer and AMD Zen 4 and newer carry these instructions.
How did Codex find it?
Calif researcher Quang Luong pulled OpenJDK's HotSpot virtual machine and asked Codex to examine the compiler, the accelerated intrinsics, widely used APIs and the cryptography code "like any serious security researcher in 2026." According to the write-up, most early findings turned out to be unreachable or unrealistic. Luong kept steering and discarding false positives until the Base64 finding surfaced. Calif's figures: about an hour to find the bug, two more hours to build the first working exploit, and a total token cost under $200.
There is a useful lesson here. Instead of letting the agent loose, the researcher first built it tools: a helper that traced and visualised heap state let the agent see what it was corrupting and why. Calif says later exploit chains were built "almost autonomously" with AI. In other words, the result came from the model plus the measurement tools and the expert steering it. We covered Calif in September for its zero-click worm over WeChat calls.
Who is affected?
Because the bug sits in OpenJDK itself, every distribution built from it carries the same code: Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle Java SE and GraalVM. The Oracle text in Debian's tracker lists affected Oracle Java SE versions 17.0.21.0.3, 21.0.13.0.3, 25.0.5.0.3 and 27.0.1.0.3. Adoptium's notice says Temurin 8 and 11 are not affected.
Calif says that among the applications it tested on default settings, it demonstrated unauthenticated remote code execution in Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins and PingFederate, and post-authentication execution in Kafka, Solr, Elasticsearch, Gerrit and Spinnaker. Calif is holding back the detailed exploit chains until users have patched. Severity scores differ by source: the Oracle text gives 8.1 on CVSS 3.1, Red Hat gives 9.8.
How to check your own systems
The check has two steps. First, the Java version:
java -versionIf it is 17.0.6 or newer, move to step two. On Linux, check whether the CPU carries the relevant instructions:
grep -o -w -E 'avx512f|avx512bw|avx512vbmi|bmi2' /proc/cpuinfo | sort -uAccording to Calif, if all four flags appear, the system is in the affected group. ARM servers and older processors without these instructions are outside the scope.
What to do
Updating is the right path. The fixed Temurin builds announced by Adoptium are 17.0.21.1+2, 21.0.13.1+2, 25.0.5.1+2 and 27.0.1.1+4; Debian's development branch carries the same numbers. Oracle shipped its fix in the November security update and OpenJDK in its November 17 advisory. On some distributions such as Ubuntu, packages were still under evaluation as of November 18, so it is worth following your distribution's security page.
For systems that cannot be updated right away, Calif and Adoptium give the same interim fix: start Java with the -XX:-UseBASE64Intrinsics flag. It turns off the hardware-accelerated Base64 code, and decoding keeps working through regular Java code. Calif also lists -XX:UseAVX=2 as a second option; use it only on x86-64 hosts, because OpenJDK on ARM will not start with it.
Why it matters
Java4Shell is a concrete example of where AI-assisted security research now stands: a bug in hand-written machine code that has run on millions of servers for years was found by an expert-guided coding agent within hours and went straight into the fix process. That same speed is available to defenders. The practical lesson for organisations is that knowing where your Java runtimes run, and being able to patch them quickly, is worth more than ever.
Sources: Calif: Java4Shell, Red Hat CVE-2026-114938, Adoptium Temurin notice, Debian security tracker, OpenJDK advisory