You may never have written a line of Java. Yet this language runs an enormous share of the world's computing: banking sites, enterprise tools, game servers, applications of all kinds. On Tuesday 17 November, Oracle released an emergency patch for a flaw deemed critical, dubbed "Java4Shell". It was discovered with the help of an AI.
What the flaw is
The flaw hides in a very ordinary Java function: the one that decodes Base64, a format used to carry images, attachments or credentials as text. On some recent processors, Java uses an accelerated version of this function. However, according to the security firm Calif, which discovered it, a carefully chosen sequence of characters is enough to cause a write outside the intended memory area.
The consequences can be serious: leakage of information held in memory, or even remote takeover of the machine. The flaw was given a severity score of 9.2 out of 10.
How an AI found it
According to Calif, researcher Quang Luong pointed Codex, OpenAI's programming tool, at the most technical parts of Java. The first results were mostly noise. But by persisting, he got the lead on the Base64 decoder. The discovery took about an hour, and developing a first working attack took two hours more, for less than 200 dollars of compute in total.
This is the new reality of cybersecurity: AI makes finding flaws much faster and cheaper. For the best, when it helps defenders, as when AI agents verified the code of the Signal messaging app. And for the worst, if attackers use it before the patches are installed.
Who is affected?
Three conditions must be met, according to Calif.
A recent version of Java. OpenJDK versions from 17.0.6 onwards are affected, along with the many distributions derived from them, such as those from Oracle, Amazon, Microsoft, Eclipse Temurin or Azul.
A processor compatible with certain advanced instructions, called AVX-512 VBMI. This is the case for many recent Intel Xeon servers and AMD processors from the Zen 4 generation or newer. ARM processors, such as those in recent Macs with Apple silicon, are not affected.
Software that processes data from outside. Calif demonstrated unauthenticated attacks on very widespread enterprise tools, such as Jira, Confluence, Jenkins or Keycloak, in their default configuration. A Java program that connects to a malicious server can also be targeted.
Calif does not say whether the flaw has already been exploited by attackers. The firm is deliberately withholding the details of its attacks, to give everyone time to update.
The name echoes Log4Shell, a flaw discovered in December 2021 in Log4j, a Java component used everywhere to log software activity. Rated 10 out of 10, it is considered one of the worst in internet history: hundreds of millions of devices were exposed, and companies took months to fix everything. The "Shell" suffix refers to the possibility, for an attacker, of obtaining a command console on the targeted machine.
What to do
If you are an individual:
Check whether Java is installed on your computer, in your system's list of applications. If it is and you do not use it, uninstall it: that is the best protection. If you need it, update it from its publisher's official site. Note that some software and games bundle their own version of Java: update those too, following the updates offered by their publisher.
If you manage servers or a company's tools:
Take an inventory of all your Java installations, including those built into third-party software. Apply the patches as a priority on services exposed to the internet, such as Jira, Confluence, Jenkins or Keycloak. If you cannot update immediately, Calif offers a temporary measure: start Java with the -XX:-UseBASE64Intrinsics option, which disables the accelerated version of the decoder. Another option, -XX:UseAVX=2, disables the instructions in question, but only on x86-64 machines, since Java will not start with this setting on an ARM processor.
Finally, take the opportunity to clear things out. Calif argues for removing unnecessary code and software: every component you do not use is a potential entry point.
In summary
This flaw is serious, but it has already been fixed. The danger now comes from those who lag behind. At a time when an AI can find a flaw in an hour, the golden rule of IT security has never been truer: updates are not a chore, they are protection. And as we recently reminded readers, it is better never to entrust your secrets to a code assistant.