
We've just had a few high-stakes security vulnerabilities making systems administrators run around with their heads on fire, and the deluge doesn't look like it's stopping any time soon. Java, the programming language that Oracle has always claimed is on billions of devices, has a critical security vulnerability that allows for remote code execution (RCE), often without even needing to log in to the application. The consequence is that an attacker can gain access to the target system, read user and internal data, and have a launch point for further shenanigans, including database access and potential system takeover.
The flaw was dubbed Java4Shell by Calif Research, the lab that found the vulnerability. The researchers say it rates 9.2 on the newer CVSS 4.0 scale, though individual reports from companies like Oracle itself and Red Hat give it their own ratings, but they're all in the 8 to 9.8 range depending on the vendor. The root cause is a bug in OpenJDK, the library that nearly every distribution of Java, whether Oracle's or anyone else's, derives their implementations from.
You can see an exploit of the bug in action below across multiple software services.

The actual bug is a flaw in an optimization for Base64 decoding, functionality that's ubiquitous in any programming language. Base64 is a format to allow for easy transformation of binary data into plain text. In the modern day, it's used to embed files in the middle of text, like inserting image data in the middle of HTML or CSS, attaching files to emails (internally they're all text-based), or simply representing data as text for visual inspection, like file checksums or cryptographic key fingerprints.
Oracle has already fixed the bug and issued updated versions of its wares. However, much like digital certificates, operating systems and even individual programs include their own copy of a Java executable, meaning that the potential blast radius is far wider than you'd expect at first glance. Calif listed many such common applications: at the time of the post, Keycloak, Jira, Confluence, Jenkins, and PingFederate all had full unauthenticated RCE, while Apache Kafka Broker, Solr, Elasticsearch, Gerrit, and Spinnaker have RCEs after authentication.
Because Java is so darn widespread, most every company has to issue security advisories and updates for their wares, including IBM, Red Hat, Siemens, and Broadcom. Because so many containers also use Java-based applications in some form, those too are vulnerable, and the count of individual vulnerable container images across registries everywhere is likely a high figure. This is likely not a bug that will be easily eradicated.
There is a condition to trigger the exploit, but it's not too difficult to fulfill. The Java instance in question must be running on an x86-64 CPU with AVX-512 support and the VBMI extension. In practice, that means chips from the Intel Ice Lake and AMD Zen 4 families, from 2021 and 2022 respectively, for their server variants. Older CPUs are not affected, as the code optimization that contains the bug is specific to VBMI.
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
The specific bug is in a hand-written assembly optimization that fails a simple bounds check. If an attacker inputs 64 As and an "=" sign as padding, they can overwrite neighboring memory, and then weaponize that corruption, similar to how Heartbleed worked. As usual these days, Calif says that the vulnerability was found by an AI bot, with $200 worth of tokens. Though unlike many other examples, this one was actually fairly deep, and it wasn't low-hanging fruit that illustrated poor code or network security hygiene.

Bruno Ferreira is a contributing writer for Tom's Hardware. He has decades of experience with PC hardware and assorted sundries, alongside a career as a developer. He's obsessed with detail and has a tendency to ramble on the topics he loves. When not doing that, he's usually playing games, or at live music shows and festivals.