Java4Shell: A Java Flaw That Could Let Attackers Run Code on Jira, Jenkins, Keycloak and More

Java sits underneath a huge share of enterprise software, so a serious flaw in the runtime itself puts many different products at risk at once. That is the worry behind Java4Shell, a vulnerability disclosed this week by the security research firm Calif.
What was disclosed
Java4Shell, tracked as CVE-2026-114938, is a flaw in a faster version of Java’s Base64 decoder. According to Calif, it can let attackers without an account run their own code on six widely used applications under default settings: Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate. It can also be used against Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit and Spinnaker, although in those cases the attacker needs a login. The researchers say their list is incomplete.
Why an unauthenticated attacker can reach it
Servers often decode Base64 data, such as HTTP Basic login headers, SAML artifacts and CSRF tokens, before they check whether the user is logged in. A malformed string that ends with an extra equals sign makes the optimized decoder write 62 or 63 bytes past the end of its output. Java rejects the string afterward, but the damage is already done. Because the bytes written are fixed, an attacker controls only where they land, which is why early readings of the source code suggested a crash rather than code execution.
Calif says it gets past that limit by arranging the server’s memory so the overflow expands a neighboring array, then using that array to write chosen bytes and a second one to read memory back, a step it calls JavaBleed. The researchers say the attack then reaches the parts of Java that run code. There is no single exploit that works everywhere, since each target needs its own memory layout and timing, and a failed attempt can crash Java, although an attacker can often try again.
How worried should you be?
The picture is mixed. The researchers are holding back their attack code, and other labs have so far reproduced crashes and a memory leak but not full code execution. Security firm Upwind reproduced the memory corruption on an AWS server and eventually crashed Java, and Blackpoint Cyber crashed a test application by sending about 28,300 malformed login requests over roughly 20 seconds, without logging in. Its group also read a secret stored next to the overflow in all 30 local test runs, but it did not achieve remote code execution. Canada’s Cyber Centre said it was not aware of any attacks, and the flaw was not in CISA’s Known Exploited Vulnerabilities catalog when The Hacker News checked.
The severity scores differ by source. Calif rates it 9.2 out of 10 under CVSS 4.0, Oracle gives it 8.1 under CVSS 3.1, Amazon scores it 8.8, and Red Hat’s preliminary score is 9.8. In short, a crash is realistic today, while full remote code execution has been shown only by the original researchers.
Who is exposed
The vulnerable code is in Java 17.0.6 and later on the Java 17 line, and in Java 21, 25 and 27. Standard Java 8 and Java 11 do not contain it, but one build, the Java SE 8 Performance Pack, is affected, as are certain GraalVM releases. It also runs only on x86-64 Intel and AMD chips that support a feature called AVX-512 VBMI, including Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids chips and AMD Zen 4 or newer. ARM64 chips are not affected. That means the same container image can be vulnerable on one server and safe on another, so administrators need to check the actual hardware.
Calif adds that a Java program that opens a TLS connection to a malicious server can also be compromised even if it runs no service of its own. That route came from another researcher, samczsun, and the details of how it reaches the decoder have not been published.
Fixes
Oracle and the OpenJDK project released fixes this week. The fixed Oracle builds are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, and Java 8 Performance Pack users should move to 8u513. Amazon has fixed its Corretto builds, and Azul has fixed Zulu 17, 21, 25 and 27. SAP released new SapMachine builds, though its release pages do not say what they fix. Red Hat had not yet released fixes for its Enterprise Linux and OpenJDK builds, and Eclipse Temurin, the Microsoft Build of OpenJDK and BellSoft Liberica had not listed fixed builds when the article was checked. Products that bundle their own Java runtime need an update from the product’s maker. After updating, restart Java services and rebuild and redeploy container images so the running process uses the new build.
Workarounds if you can’t patch yet
Two JVM flags can help in the meantime, and both should be removed once the fixed build is installed. One turns off only the faster Base64 code, which removes the vulnerable path while leaving other AVX-512 speedups in place. The other turns off AVX-512 entirely, but it should be used only on x86-64 servers because Java on ARM64 will fail to start with it. In Upwind’s lab, both stopped the overflow on every affected version tested. A reverse proxy that waits for complete requests, as nginx does by default, blocks some attacks but not all.
Signs of attempted attacks
Upwind suggests watching for long Base64 tokens that end in an equals sign and whose length is not a multiple of four, especially in Authorization headers, along with bursts of Base64 decoder errors and unexplained JVM crash logs or repeated restarts. None of these proves a compromise, and their absence does not prove a server is safe.
A warning sign that was public
The article adds an uncomfortable detail. A proposed fix describing an overflow in the same AVX-512 Base64 decoder code was submitted publicly to OpenJDK on September 9. Its author closed it without merging in early November after an automated notice about inactivity. It is a reminder that important security clues can sit in plain sight.
What to do now
Find out where Java 17 or later runs in your environment, including inside bundled products and container images. Prioritize internet-facing systems such as Jira, Jenkins and Keycloak, check whether the underlying hardware supports AVX-512 VBMI, and apply the fixed builds. Where that isn’t possible yet, use one of the workaround flags and watch for the signs above.
Final thoughts
Java4Shell shows how a flaw in a performance optimization, one that only runs on certain chips after the code has been compiled for speed, can become a security problem across many products. The sensible response is neither panic nor delay: no attacks have been reported, but the fix is available and the exposure is wide.
Reference




Comments