AI

Java4Shell CVE-2026-114938: an AI agent found it in three hours

Key takeaways

  • Java4Shell (CVE-2026-114938) is a memory-corruption bug in OpenJDK's Base64 decoder that Oracle has now patched
  • The discovery took three hours and $200 in tokens, which changes the economics of vulnerability research
  • There is no universal exploit, so exposure depends on how each organisation uses Base64
  • Patch now and treat AI-assisted bug hunting as something defenders should be doing too

How did a researcher and an AI coding agent find a critical flaw in one of the most widely deployed runtimes on earth in three hours? Calif, a cybersecurity startup, says it spent three hours and $200 in tokens to find and exploit CVE-2026-114938, a memory-corruption bug in OpenJDK's Base64 decoder that it has nicknamed Java4Shell. Oracle has released a patch.

What Java4Shell actually is

Java4Shell is a memory-corruption vulnerability, meaning code that writes data to places it should not. The consequences range from a crash to, at worst, an attacker running their own commands on the machine. Calif says this one can reveal sensitive memory and allow remote code execution.

The affected component is the Base64 decoder in OpenJDK, the free Java runtime. Base64 is a way of encoding binary data as plain text, and it turns up everywhere: in login tokens, email attachments, API payloads and configuration files. CyberScoop reports that OpenJDK underpins software across banking, aviation and telecommunications, and that by Calif's count it runs at 90% of Fortune 500 companies. BankInfoSecurity puts it differently but similarly: Java powers more than 90% of the world's largest companies, including many government systems.

Calif says the trigger is strikingly small: "just 64 A characters followed by a single =."

How it works

Java is often praised for memory safety, so a memory bug in Java sounds contradictory. Calif's explanation is that the Java runtime itself is built using languages such as C and C++, where memory corruption persists. The bug sits in hand-rolled assembly code, written directly for the processor, that handles the final few characters of the input. Calif describes it as a flaw in "optimised machine-level code that lets malformed input overwrite neighboring memory."

An analogy helps. Think of the decoder as a postal sorter that is fast because it skips safety checks on the last few parcels in each batch. Hand it a batch shaped just wrongly and the final parcels spill into the neighbouring bay, overwriting whatever was stored there. The malformed input is the oddly shaped batch.

Calif says there is no universal exploit. Whether an attacker can use the flaw depends on how an organisation uses Base64: what it decodes, where the input comes from, and what sits next to it in memory.

How the AI found it

The process is the interesting part. Researcher Quang Luoung audited OpenJDK and chose to look at the compiler, cryptography and APIs. He directed Codex, OpenAI's coding agent, at each target "like any serious security researcher in 2026." Calif did not name the model behind Codex, though BankInfoSecurity says The New York Times reported it was the recently released GPT-6 Cyber. Our earlier piece covers what GPT-6 Cyber does.

The agent did not simply hand over a finished exploit. Luoung considered a large share of its responses to be "slops", his word for low-quality output. But in one of Base64's decoders it found memory corruption. One hour went on discovery and two on building an exploit.

Calif says the exploit work sped up because researchers first spent effort building pipelines and strategies, then directed AI agents to use them. In its words, "most of the later chains are built almost autonomously with AI." Human skill went into the scaffolding; AI agents then built most of the later chains almost autonomously.

Who is affected, and what the response has been

Oracle shipped its fix the same day, according to CyberScoop, as part of a November update covering 652 flaws across its product line. Any organisation running Java needs to confirm the patch has reached every runtime it operates.

British researcher Kevin Beaumont told his followers to stay calm. He described "a bunch of TLP RED bonkers briefing about a world ending Java vuln" and added: "It's not world ending. It's not very exciting. Just patch as you normally do later on today - as you should have last month as there was a different unauth RCE vuln then." Beaumont's point is that the discipline matters more than the drama: a previous unauthenticated remote code execution flaw was already waiting to be patched.

Java4Shell follows PHP2Shell, disclosed on 21 October, which affected the PHP language that powers websites and the hosting platforms behind them.

What the limitations are

The headline figures need careful reading. Three hours and $200 covers the discovery and exploit work, not the groundwork before it. The researchers first built pipelines and strategies, and a skilled human directed the work and filtered the weak output. The agent is a force multiplier for an expert, not a replacement.

The lack of a universal exploit also matters. A server that never decodes attacker-controlled Base64 is in a different position from one that accepts it on an unauthenticated endpoint. Beaumont's view is that this is a routine patch, not an emergency, and Calif's own description supports the idea that exposure is uneven.

None of that makes the economics comfortable. If a bug in widely used code can be found and weaponised for the price of a modest cloud bill, attackers can do the same. BankInfoSecurity notes that AI model providers and cybersecurity companies have urged organisations to use AI agents to defend against threat actors, as models increasingly reveal vulnerabilities and make attacks easier.

What this means in practice

For UK organisations, the legal framing is straightforward even though the source names no UK action.

Practical steps for IT teams:

  • Apply Oracle's November update and confirm the fixed OpenJDK build is running everywhere, including containers and embedded runtimes.
  • Inventory where applications decode Base64 from untrusted sources, because that determines real exposure.
  • Check the earlier Java remote code execution fix Beaumont mentions was applied last month.
  • Raise patch cadence for internet-facing services; the window between disclosure and AI-assisted exploitation is shrinking.

Java4Shell is a critical flaw that Beaumont says can be patched as normal. The new element is the method: a coding agent, a skilled researcher and $200 in tokens produced a working exploit chain in three hours. Defenders with the same tools can audit their own code for the same price.

Where this is heading

Expect more bugs in mature, heavily reviewed code to surface this way, because agents are patient and cheap. Watch whether other runtimes and languages get the same treatment after PHP2Shell and Java4Shell, and whether vendors start running agent-driven audits before release rather than after disclosure. For now, the action is unglamorous: patch Java today, and start asking why your own code review is not using the same tools.

Frequently asked questions

What is Java4Shell?

Java4Shell is the nickname for CVE-2026-114938, a memory-corruption vulnerability in OpenJDK's Base64 decoder. Calif says it can reveal sensitive memory and allow remote code execution. Oracle has released a patch.

How long did it take AI to find the Java flaw?

Calif says it took three hours: one to discover the vulnerability and two to build an exploit. The researchers spent $200 in tokens, using OpenAI's Codex coding agent.

Is Java4Shell a world-ending vulnerability?

Not according to British researcher Kevin Beaumont, who called it neither world ending nor very exciting and advised patching as normal. Calif says there is no universal exploit, because exposure depends on how an organisation uses Base64.

Who is affected by Java4Shell?

Organisations running OpenJDK, the Java runtime that Calif says runs at 90% of Fortune 500 companies. The practical risk depends on whether their code decodes untrusted Base64 input.

More from Future Technology HQ