A critical flaw in an open source runtime at the heart of the Java programming language allows unauthenticated attackers to perform remote code execution (RCE) on myriad Java applications used globally across enterprise organizations.

The memory corruption vulnerability exists in versions of OpenJDK, a popular open source runtime. Researchers at security startup Calif demonstrated a general proof-of-concept (PoC) exploit for the flaw, dubbed “Java4Shell” and discovered with the help of artificial intelligence (AI), according to a report published Tuesday.

However, they are holding back the release of “weaponized chains for individual products” to give organizations time to upgrade to patch the vulnerability, officially tracked as CVE-2026-114938 and rated as 9.2 under CVSS 4.0, in affected applications, Calif security engineer Quang Luong wrote in the post.

Java4Shell affects the following releases: Java 17: 17.0.6 to 17.0.21; Java 21: up to 21.0.13 affected; Java 25: up to 25.0.5; Java 27: up to 27.0.1; Java 8, 8u511b33-perf, its Performance Pack build. Java 11 and Java 17.0.0 to 17.0.5 remain unaffected.

Related:Major Brazilian Signature Apps Enable RCE & Fraud

OpenJDK published a security advisory on the flaw, and Oracle released a patch yesterday to fix the issue in the affected versions of Java. “All Java users should update immediately,” Luong recommended.

Issue Lies in Base64 Decoding

The flaw exists because of how OpenJDK decodes Base64, a common way of representing binary data as text in authentication protocols, in file uploads, and to deliver network messages.

“To decode Base64 faster, OpenJDK uses specialized x86-64 CPU instructions to process many bytes at once,” Luong explained. “We discovered a bug in that optimized machine-level code that lets malformed input overwrite neighboring memory.”

Specifically, OpenJDK uses specialized AVX-512 VBMI instructions on supported x86-64 processors, he explained. The bug is present in the hand-rolled assembly code that handles the final few characters.

“For the 65-character input above, OpenJDK allocates a 50-byte result array,” Luong wrote. “After decoding the first 64 characters, the routine mishandles the stray = and calculates a negative output length. That invalid length becomes a full 64-byte write, sending 62 bytes past the end of the array.”

Java eventually rejects the input, but by then neighboring objects may already be corrupted, he added. Thus, attackers can exploit the bug to reveal sensitive memory, as the highly critical OpenSSL flaw Heartbleed did in 2014, or to perform RCE. “The corruption itself can be triggered by just 64 A characters followed by a single =:,” Luong wrote.

Related:Google Project Zero Slashes Bug Disclosure Deadlines, Splitting Experts

Java4Shell and Ghosts of Flaws Past

Much like previous high-profile flaws before it, including not only Heartbleed but also PHP2Shell and Log4Shell, the flaw has potential to create a security quagmire across entire technology ecosystems because of how widespread the use of the vulnerable software component is. Indeed, Java “is the beating heart of the modern economy” and the third most popular programming language, powering 90% of Fortune 500 companies, Luong wrote.

Log4Shell, disclosed in 2021, affected Apache Log4j, a commonly used Java logging library, and enabled attackers to execute malicious code remotely. More recently, PHP2Shell, disclosed in October 2026, exposed critical vulnerabilities in the PHP runtime that could allow unauthenticated attackers to execute code on vulnerable servers.

Both flaws highlighted the difficulty of identifying vulnerable components hidden within applications and third-party software used across organizations; Java4Shell is similar in this respect because it gives attackers a direct route to enterprise environments through otherwise trusted apps.

“Java4Shell is a reminder that the software underneath your applications is also your attack surface,” observes Dom Glavach, CISO at application security solutions provider Black Duck.

Related:‘Sleeper Agent’ Tactic Hides Payloads in Open-Weight AI Models

The practical problem now for organizations “is that exposure depends on the Java build, the processor and how an application handles input, and many teams cannot answer those questions quickly, especially for JDKs bundled inside applications and containers,” he says.

AI Gets the Assist on Java4Shell Discovery

Because flaws like these are so deeply embedded, they may go undiscovered and remain critical security gaps. In this case, the use of AI to uncover Java4Shell potentially may have helped the industry avert disaster, giving organizations time to patch before it’s been widely exploited, notes James Matchett, head of security at Cloudsmith.

“Its discovery shows how AI can uncover weaknesses in widely used software that might otherwise have gone undetected for years,” he says.

Indeed, Java4Shell’s discovery iillustrates how AI can speed up vulnerability discovery.

“An AI coding assistant found this bug in about an hour and a first working exploit took two more, for under $200 in tokens,” Waseem Ahmed, head of engineering for cybersecurity firm Secure.com, tells Dark Reading. “The flaw sat in one of the most-audited runtimes there is. That is what discovery looks like now: cheap, fast, and available to defenders and attackers alike.”

However, Matchett says the flip side is it also can help attackers move more quickly to weaponize security flaws, noting that organizations are under intense pressure to find and remediate vulnerabilities before attackers can exploit them. As Ahmed puts it, “defenders now have less time between a bug being found and being used.”

RCE Across Multiple Platforms

There is little doubt that defenders should take the Java4Shell seriously. Calif researchers demonstrated RCE in a laundry list of widely deployed Java applications in their default configurations, noting that they, too, used AI to develop exploits, Luong wrote.

The team achieved pre-authorization RCE in the following: Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, and PingFederate. Meanwhile, Apache Kafka Broker, Apache Solr, Elasticsearch, Gerrit, and Spinnaker are vulnerable to post-auth RCE, they said.

“The lists are non-exhaustive,” Luong wrote. “We also demonstrated RCE in sample applications built on widely used frameworks, including Apache Struts and Spring Boot. Ordinary features such as authentication and file uploads can expose the vulnerable Base64 decoder, extending the potential impact far beyond the products we tested.”

An independent researcher also shared with Calif a client-side exploit that demonstrates how “a Java program that opens a TLS connection to a malicious server can be compromised, even if it exposes no service of its own,” Luong wrote.

Organizations also can mitigate Java4Shell by starting OpenJDK with one of the following flags: -XX:-UseBASE64Intrinsics to disable hardware-accelerated Base64 encoding and decoding, or -XX:UseAVX=2 to disable AVX-512, Luong advised.

The second should only be applied on x86-64 hosts, as OpenJDK on ARM does not recognize it and thus won’t start the system, he added.

Black Duck’s Glavach recommends that organizations start their mitigation process with conducting an inventory, patching Internet-facing identity and build systems first, and staying clear of unverified fixes and fake exploits circulating online.

Secure.com’s Ahmed was even more specific, advising that organizations “find every server running Java 17.0.6 or later, patch the ones open to the Internet first, and turn off the Base64 intrinsic where you can’t patch yet.”





Source link

#

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *