Codex Helps Calif Find a Critical Java Flaw in One Hour
Oracle and OpenJDK shipped fixes for Java4Shell on November 17, with no attacks seen, and CISA is asking every organization running Java to update now.

It took Quang Luong, a researcher at the California security firm Calif, about an hour with OpenAI's Codex to find a flaw at the heart of Java, and less than $200 in AI tokens in total. The bug, now called Java4Shell, lets a crafted piece of text corrupt memory inside OpenJDK 17.0.6 and newer, and in some popular server apps it can let an outsider run their own code. Oracle and OpenJDK released fixes on November 17 before Calif published any details, and no attacks had been seen by then, which gives the teams running Java a head start.
One Hour, One Codex Session, Under $200
Luong did not ask the AI to find a bug in Java. He chose where to look: the just-in-time compiler, the hand-tuned shortcuts Java uses for common jobs, and the cryptography that every web server touches. Then he told Codex to look at those areas. By his own account, the early answers were mostly slop, and he prompted harder. About 20 minutes of that persistence turned up the flaw.
Calif says the discovery took an hour and the first working exploit two more. Later exploit chains, the firm says, were built almost autonomously with AI. Its write-up sums up the method in one line.
“The best hacker today is neither AI nor human.”— Calif
So what exactly did an hour of prompting uncover?
A Base64 Shortcut That Wrote Too Far
Base64 is the humble format that turns binary data into plain letters, and Java decodes it constantly: in login tokens, certificates and web requests. To do it fast on Intel and AMD processors, OpenJDK's HotSpot engine uses a hand-written routine for chips with AVX-512 instructions. Calif found that the routine miscalculated how much to write at the padded end of the input. A short string of the letter A followed by an equals sign makes Java write past the memory it had reserved.
Calif turned that overflow into a way to read secrets such as keys and tokens, then into remote code execution. In its lab tests, that worked without logging in on default setups of Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins and PingFederate. ARM servers are not affected. Calif rates the flaw 9.2 out of 10; Oracle and OpenJDK score it 8.1, noting that a working attack takes precise timing.
The reach is wide because Java is everywhere: Calif, citing IBM, says it runs at 90% of Fortune 500 companies. That makes the order of events the most important part of the story.
The Fix Shipped Before the Details
Calif waited for the patch. Oracle's November update and an OpenJDK advisory went out at 1 p.m. Pacific on November 17, and only then did Calif publish how the bug works, along with a limited test that shows the memory overwrite. It is holding back the exploits for specific products while companies upgrade. As of that day, no attacks had been reported and the flaw was not on CISA's list of exploited vulnerabilities.
The US cybersecurity agency still moved fast. Its alert that evening said CISA strongly urges organizations to immediately patch, and it reminded teams that Java often hides inside other software: JDKs and Java runtimes may not appear as separate entries in software inventories. For those who cannot update today, Calif suggests switching off the faulty shortcut with a single startup flag.
The same AI that found the hole in an hour is available to the people who defend Java. When finding a bug costs less than a laptop, the race goes to whoever looks first, and this time the fix arrived ahead of the attackers.
From Prompt to Patch in a Day
The Brief
Stay curious
AI and technology: what changes and why it matters.
Your daily selection, in English or Spanish.
Free forever. Unsubscribe anytime.
More stories

The Specialty News





Conversation
Start the conversation