Security: an AI helped find "Java4Shell", a critical flaw in Java, should we be worried?
One hour. That's how long it took Quang Luong, a researcher at Calif, to find with Codex, OpenAI's programming assistant, a flaw in Java that no one had seen for nearly four years. And the AI bill? Less than 200 dollars! The flaw was made public yesterday, Tuesday, November 17, under the name Java4Shell, and it is rated critical: 9.2 out of 10 for Calif, 8.1 for Oracle, on the severity scale everyone in the field uses. But the good news first, and it's a big one: the fix came out that same day.
Java means coffee in American slang, and this cup had been leaking since 2023
Java, if you're not in the field, is both a programming language and the engine that runs programs written with it. You never see it, but it works behind a huge part of websites and business software. My own field is Microsoft's C#, its big cousin, which works on exactly the same principle. So naturally, news like this makes me look up from my coffee. And the name wasn't chosen at random: it recalls Log4Shell, the December 2021 flaw in a small Java tool that keeps a log of programs, and that had computer people all over the world running around during the holidays.
Base64, or how you turn a photo into letters
The problem is hiding in a very ordinary corner. Base64 is a way of turning any file (a photo, a PDF, a security key) into a sequence of letters and numbers, so it can travel where only text is accepted. Your email attachments have been traveling that way for decades. So a Java server spends its days decoding Base64, again and again.
To make things faster, Java's engineers wrote a special version of this decoder by hand, in assembly, the language closest to the processor, where you speak almost directly to the circuits. This version takes advantage of very fast computing instructions found on recent Intel Xeon processors and at AMD since the Zen 4 generation (the Ryzen 7000 and later, and server EPYCs). And that's where things go wrong. When it's sent Base64 text that has been malformed in one very specific way, the decoder writes a little farther than the small space intended for the result, and overwrites whatever is right next to it in memory. Java does eventually say "this text isn't valid"... but too late, the mail is already at the neighbors' place.
The decoder spills out of its space and overwrites the neighboring ones in memory
A hacker who knows exactly what to slip in beside it can then take control of the server, without even needing a password. Calif demonstrated it on software commonly used in businesses, with their original settings: Jira and Confluence (Atlassian's tools for tracking projects and organizing documentation), Jenkins (the robot that automatically builds and delivers developers' software) or Keycloak (which manages the employee login page in many companies). And this isn't limited to servers: another researcher showed that a simple Java program connecting to a booby-trapped server can also get caught.
One hour of Codex, and a lot of garbage beforehand
Now, the AI part. And it's more nuanced than the one-hour figure suggests. Quang Luong sent Codex digging through the parts of Java he considered fragile: the compiler that speeds up code while it runs, those famous hand-written routines, cryptography. The AI searched. And the researcher admits it without beating around the bush: "most of the first results Codex brought back to me were garbage". The real find only came after keeping at it.
Codex turns up dozens of leads, the researcher keeps the right one
Calif has a nice formula for describing the division of roles: “AI brings the power, our researchers bring the context”. They talk about “centaur hacking”, half-human, half-machine. One hour to find the vulnerability, two more hours to get a first attack that works, and less than $200 in computing costs in total. Digging through hand-written assembly used to mean entire days of specialist work not so long ago, and even then, only if you looked in the right place. And it's not even their first time: last month, the same team had released php2shell, another vulnerability found with AI, in PHP this time. It confirms what I was telling you nearly a month ago with this AI that found a vulnerability in seven out of ten websites : vulnerability hunting has shifted up a gear.
And frankly, I think that's good news. This vulnerability had been sleeping in Java since version 17.0.6, released in January 2023. Nearly four years waiting for someone to stumble across it. This time, researchers found it, they alerted Oracle and the OpenJDK team (the free version of Java, which everyone relies on), and the fix came out the same day as the announcement. Calif is even keeping its complete attack recipes for each piece of software under wraps for now, while people update. That's exactly how it should always happen.
And you, are you affected?
On your phone or tablet: no. The vulnerability only affects recent Intel and AMD processors that have those famous fast instructions. ARM chips, the ones in your smartphone or an Apple chip Mac, are not affected.
The real work is for those who run servers: companies, hosting providers, government departments. If your company uses Jira, Confluence or Jenkins on its own machines, your IT department has work to do this morning. And for you, a customer of a bank, an insurance company or an online shop, it's up to them: their teams have to install the update, and quickly.
This morning, in the server rooms, Java is being updated
On your PC, if a piece of software ever made you install Java, you lose nothing by checking your version. In a terminal (or the command prompt on Windows), type:
java -versionThe vulnerability affects Java 17, 21, 25 and 27, starting with 17.0.6, whatever the vendor: Oracle, Eclipse Temurin, Microsoft, Amazon Corretto, Azul Zulu, Red Hat... If you see one of these versions, install your provider's November update. At Oracle, for Java 17, it's 17.0.21.1.
And for administrators who can't update right away, Calif and OpenJDK offer a temporary workaround: disable the faulty acceleration by adding this option when launching Java. Decoding becomes a tiny bit slower again, but it becomes safe again, and it works on all machines:
-XX:-UseBASE64IntrinsicsWhat could be removed
The sentence that struck me most in Calif's report isn't the one about AI. It's this one: “the right question for security may be: what can we remove?” A piece of hand-written assembly intended to save a few fractions of a second left a door open for nearly four years. Personally, between code that's a little slower than everyone understands and ultra-fast code that nobody dares reread, my choice is quickly made.
And the race is on on both sides: a month and a half ago, Microsoft was already noting that hackers were exploiting a vulnerability in less than a day. Hackers have Codex too. This time, the good guys were faster. And for $200, hats off to Calif, that's probably the best security investment of the year!
Sources
- Calif, November 17, 2026: Java4Shell, the vulnerability and its discovery with Codex (in English)
- OpenJDK: security advisory of November 17, 2026 (in English)
- Oracle: release notes for Java 17.0.21.1 (in English)
- Unite.AI: Calif finds Java4Shell with AI, OpenJDK and Oracle release the fixes (in English)
- CyberScoop: a critical Java vulnerability revealed with the help of AI (in English)
Article written with the help of Claude Code, proofread and corrected by me.




Join the conversation
You need an account to comment on this article. Creating one is free and takes under a minute.
No comments yet.