LATEST
AI Tools

Java4Shell: The Critical Java Flaw an AI Found in an Hour

Updated November 19, 2026
14 min read
Editor's Note: This article was human-reviewed for accuracy
Close-up of programming code on a dark computer screen

Quick Answer & Key Takeaways

  • • Java4Shell (CVE-2026-114938) is a critical flaw in OpenJDK's Base64 decoder that lets attackers run code on unpatched Java servers without logging in.
  • • A researcher found it with OpenAI's Codex in about an hour, for under $200 in token costs, and Oracle shipped fixes the same day.
  • • If you run Java 17 or newer on an Intel or AMD server, patch now: CISA warns the flaw can crash the JVM or allow remote code execution.

On November 17, 2026, a security firm disclosed a critical flaw in the Java runtime that powers much of the modern internet, and the story of how it was found may matter as much as the flaw itself. Java4Shell, tracked as CVE-2026-114938, is a memory-corruption bug in OpenJDK's Base64 decoder that can let an attacker run code on an unpatched server without logging in. A researcher at the firm Calif found it with OpenAI's Codex in about an hour, built a working exploit in two more, and says the total token cost was under $200. Oracle shipped fixes the same day, and the U.S. Cybersecurity and Infrastructure Security Agency (CISA) told organizations to patch immediately.

Java sits far deeper in the stack than the web frameworks most people see. Calif notes that Java ranks third on the TIOBE popularity index and that IBM credits it with powering 90 percent of Fortune 500 companies. Banking, aviation, telecommunications and national security systems all run on it. That is what makes a flaw in the runtime itself, rather than in one application, so serious: a single bug can reach every Java program on affected hardware. If you run Java servers, this is a patch-now week, not a read-about-it-later week.

What Java4Shell is

The flaw lives in OpenJDK's HotSpot virtual machine, in the hand-written assembly code that decodes Base64. Base64 is the standard way of turning binary data into text, and it shows up everywhere: authentication headers, file uploads, network messages, tokens. Because decoding happens so often, OpenJDK speeds it up with specialized processor instructions, AVX-512 VBMI, on supported x86-64 chips. That optimized path is where the bug sits.

For a specific malformed input, 64 letter-A characters followed by a single equals sign, the decoder miscalculates the length of its output. OpenJDK sets aside a 50-byte result array, then the faulty mask calculation turns a negative output length into a full 64-byte write starting at offset 48, which runs 62 bytes past the end of the array. Java eventually rejects the input as invalid, but by then neighboring memory may already be corrupted. On older OpenJDK 17 builds, the trigger is 128 A characters followed by an equals sign instead.

The corruption can be turned into two different attacks. Calif demonstrated that it can leak the contents of the Java heap, which may hold personal data, private keys and tokens, in a technique it calls JavaBleed. With more work, the same corruption becomes remote code execution. Calif stresses there is no universal exploit: each application needs its own chain, because the steps depend on how that application uses Base64. The firm says it built the first chains by hand, then directed AI agents to build most of the later ones almost on their own.

Who is affected

Three conditions have to line up. The server must run an affected OpenJDK build, on an x86-64 processor with AVX-512 VBMI support, and the vulnerable code must actually run. The affected range starts at OpenJDK 17.0.6 and covers the 17, 21, 25 and 27 lines. The vulnerable AVX-512 Base64 code was backported to Java 17 in 17.0.6, which is why Java 8 and 11 are not affected by this flaw: Red Hat lists its OpenJDK 8 and 11 packages as not affected, and the OpenJDK advisory's risk matrix does not mark those versions for this CVE.

On the hardware side, the affected chips are Intel Ice Lake and newer server generations, and AMD Zen 4 and newer, including EPYC and Ryzen parts. ARM64 servers are not affected at all, which means most phones and many cloud ARM instances are outside the blast radius. On Linux, Censys notes a host needs the avx512f, avx512bw, avx512vbmi and bmi2 flags in /proc/cpuinfo, and warns against using that check to rule a host out, since a workload can land on a different processor after a resize or migration.

Calif tested the flaw against widely deployed Java applications in their default configurations and says it achieved remote code execution in eleven of them:

Access neededApplications
No loginKeycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins, PingFederate
Logged inApache Kafka Broker, Apache Solr, Elasticsearch, Gerrit, Spinnaker

The list is not exhaustive. Calif also demonstrated code execution in sample applications built on Apache Struts and Spring Boot, and says ordinary features such as authentication and file uploads can expose the vulnerable decoder. Wiz, a cloud security firm, separately says it proved remote exploitation is feasible against Jenkins, Confluence and Apache Tomcat. And the attack is not limited to servers: researcher samczsun shared a client-side exploit with Calif, showing that a Java program opening a TLS connection to a malicious server can be compromised even if it exposes no service of its own.

The severity scores differ by scorer, and the gap is worth understanding. Calif rates the flaw 9.2 out of 10 under CVSS 4.0, in the critical band. Oracle, which assigned the CVE, scores it 8.1 under CVSS 3.1, with high attack complexity, and notes in its CVE record that the flaw is difficult to exploit. Red Hat rates it critical with a preliminary CVSS v3 score of 9.8. The disagreement is about exploit difficulty, not about impact: everyone agrees that a successful attack can take over the affected product.

How an AI found it in an hour

The discovery is the part of this story that will be talked about longest. Calif researcher Quang Luong had been auditing OpenJDK's HotSpot virtual machine and, in his own words, told Codex to look at the areas a serious security researcher would check in 2026: the JIT compiler, intrinsics, widely accessible APIs and cryptography. Most of the early results were dead ends, either unreachable or unrealistic to exploit. He kept prompting, and Codex eventually surfaced a finding in the Base64 decoder itself. One hour to find it, two more hours to build the first working exploit, for under $200 in token costs.

Calif calls the combination the centaur hacker: AI brings the horsepower, the researcher brings the context, and the hacker of today is neither AI nor human alone but part human and part AI. The firm makes the same point about defense. Its write-up introduces an idea it calls vibe-uncoding: use AI to comb a large codebase, flag the dead code and needless optimizations, and remove them to shrink the attack surface. The Java4Shell bug is its example of why that matters. The AVX-512 Base64 optimization helps applications that decode enormous amounts of data, but the code ships to everyone else too, including applications that gain little from it. An optimization few applications needed became a serious security risk for all of them.

This is Calif's second AI-assisted disclosure in under a month. The firm disclosed PHP2Shell in October, two critical PHP flaws that we covered when the patches landed, and the pattern repeated: an AI-assisted find, word of the flaw leaking before the patch was ready, and a same-day fix. The difference this time is the target. PHP is a web technology; Java sits underneath the systems that run the economy.

The patches: what shipped on November 17

Oracle released its November Critical Security Patch Update on November 17, with 655 security patches across its portfolio. The Java SE portion carries 11 fixes, and Oracle's advance notice says all 11 can be exploited over a network without authentication. Java4Shell is the most severe of them. The OpenJDK advisory published the same day lists CVE-2026-114938 under the hotspot/compiler component and credits Quang Luong and Albert Yang among the reporters. It also lists ten further CVEs fixed in the same release, ranging from 3.7 to 7.4 under CVSS 3.1, which is a reminder that this was a broad patch day, not a single-flaw event.

Patched builds shipped the same day. Oracle JDK 17.0.21.1 was released on November 17, and Amazon Corretto lists 17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2 and 27.0.1.1.4 in its changelogs for this CVE. The other major distributions, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine and Red Hat's OpenJDK builds, mirrored the fix quickly. Red Hat issued advisory RHSA-2026:100573 on November 18. Calif says Oracle's patch went out at 1:00 p.m. Pacific, which matters for one reason: the flaw had already leaked before the patch was available, so the window between disclosure and exploitation was open from the start.

CISA published its alert the same day, jointly with the Canadian Centre for Cyber Security, calling Java4Shell a critical memory-corruption vulnerability in the Base64 decoder of the x86-64 HotSpot JVM and urging organizations to patch immediately. As of November 18, no confirmed exploitation in the wild had been reported, and the flaw was not in CISA's Known Exploited Vulnerabilities list. That is not the same as safety. Censys reports that public repositories already claim working exploit chains against lab applications, none independently verified, and that VulnCheck says a full remote code execution exploit has been available to its customers since 6 p.m. Eastern on November 17. Monitoring providers also report probing and exploit-shaped requests. The gap between a published trigger and a working weapon is closing fast.

The GPT-6 Cyber question

One detail in this story needs care, because two different accounts are circulating. Calif's own write-up says it used Codex, and names no model behind it. A New York Times report, summarized by Techmeme, says Calif used GPT-6 Cyber to uncover the flaw. GPT-6 Cyber is OpenAI's cybersecurity model, launched on November 5, and it is available only to vetted customers through OpenAI's Daybreak Red program. The distinction matters because Codex is the product and GPT-6 Cyber is the model that may power it for security work, and the public record does not yet pin down which model ran this particular audit.

The same day Java4Shell was disclosed, Forbes reported that OpenAI and Calif had used GPT-6 Cyber over recent months to find about 35 vulnerabilities across Apple products, including iPhones, Macs, iPads, Apple Watches, Apple TVs and Vision Pro headsets, and had built an exploit that could bypass some protections of Apple's Lockdown Mode. Calif CEO Thai Duong told Forbes that Apple fixed many of the reported weaknesses after being alerted. Apple had not responded to Forbes at the time, and OpenAI confirmed only that Apple had credited it for vulnerabilities it found. Apple's own October 26 security notes credited OpenAI Codex Security for three WebKit flaws, which is a different credit from the GPT-6 Cyber claim and should not be read as confirmation of all 35. Treat the Apple numbers as reported, not confirmed, until Apple or OpenAI publishes a list.

What to do right now

Patch first and ask questions later. Update every affected Java installation to a fixed build and restart every JVM, because a patched file on disk does nothing until the running process is replaced. CISA advises inventorying JDKs and Java runtimes first, including ones bundled inside third-party applications, container images and appliances, which may not appear as separate entries in software inventories. Patch internet-facing systems first, then work inward.

If patching has to wait, two JVM flags stop the overflow. Calif recommends -XX:-UseBASE64Intrinsics, which disables the Base64 intrinsics, and -XX:UseAVX=2, which disables AVX-512. VulnCheck tested both and reports each stopped the overflow on OpenJDK 17, 21 and 25. Note that -XX:UseAVX=2 applies only on x86-64 hosts, because it fails to start on ARM, and neither flag replaces the patch. CISA also suggests restricting and validating Base64 input at the application boundary, enforcing input-size limits and limiting unauthenticated access as temporary controls. Calif warns that request buffering is not a general mitigation, and Wiz says web application firewall rules are unlikely to cover every code path.

Check your own exposure with the specifics vendors have published. The Keycloak team said on November 18 that an instance is at risk if it runs an unpatched OpenJDK build from 17.0.6 onward, its x86-64 host exposes the avx512vbmi CPU feature to Java, and the JVM has Base64 intrinsics enabled without the -XX:UseAVX=2 limit. In its testing, about 28,000 unauthenticated requests carrying a malformed Base64 authentication value killed the JVM in roughly 20 seconds. Updated Keycloak images containing the fix were announced on November 19 for the latest, 26.8, 26.8.2 and 26.8.2-3 tags. If an instance was reachable while unpatched, review it for signs of use and rotate its credentials if compromise cannot be ruled out.

Why this one matters

Java4Shell is not the worst Java flaw ever found, and it is not the easiest to exploit. Its importance comes from the combination: a runtime-level bug, a huge installed base, a trivial trigger string, and an AI-assisted discovery process that compressed months of auditing into an afternoon. The trigger is 65 characters. The cost to find it was under $200. The products it reaches include the identity, build and search systems that sit at the center of most engineering organizations.

It also sets a pattern worth watching. PHP2Shell and Java4Shell arrived within a month of each other, from the same firm, found the same way, and both leaked before their patches were ready. If AI-assisted auditing keeps producing critical findings at this pace, the security calendar will stop being a monthly patch Tuesday and start being a rolling emergency. The defenses that scale are the boring ones: inventory your runtimes, patch on the day the fix ships, and remove the code you do not need. Calif's vibe-uncoding pitch is easy to dismiss as marketing, but the underlying point is hard to argue with after this week. The code you never needed is the code that can hurt you.

Common mistakes to avoid

Do not assume your Java 8 or 11 systems are affected. They are not, for this CVE, because the vulnerable code only exists from OpenJDK 17.0.6 onward. Do not assume a firewall rule fixes it. The vulnerable decoder sits behind ordinary features such as login forms and file uploads, and the paths that reach it are too varied for a single rule to cover. Do not wait for news of active exploitation before patching. Exploit code was already circulating in unverified form within a day of disclosure, and the absence of a confirmed attack is not evidence that none is coming. Do not confuse the three severity scores. Calif's 9.2, Oracle's 8.1 and Red Hat's preliminary 9.8 use different CVSS versions and different judgments about exploit difficulty; the impact they describe is the same. And do not treat the JVM flag workaround as a fix. It buys time, nothing more.

Frequently asked questions

Is my phone affected by Java4Shell?

No. The flaw only fires on x86-64 processors with AVX-512 VBMI support, which means recent Intel and AMD server and desktop chips. ARM64 processors, which power nearly all phones, are not affected. Your risk is on the server side, in the Java applications and services you use.

How do I know if my Java server is affected?

Check three things. First, the Java version: OpenJDK 17.0.6 and later, including the 21, 25 and 27 lines, are affected. Second, the processor: on Linux, look for the avx512f, avx512bw, avx512vbmi and bmi2 flags in /proc/cpuinfo. Third, whether the application decodes attacker-supplied Base64, which most web-facing Java applications do through login forms, file uploads and API calls.

Is Java4Shell being exploited in the wild?

Not that anyone has confirmed. As of November 18, CISA had not added the flaw to its Known Exploited Vulnerabilities list, and no confirmed successful exploitation had been reported. Unverified exploit code was already circulating in public repositories within a day, and monitoring providers report probing traffic, so the window for patching is short.

What should I do if I cannot patch immediately?

Start the JVM with -XX:-UseBASE64Intrinsics or -XX:UseAVX=2, both of which VulnCheck reports stop the overflow on OpenJDK 17, 21 and 25. Restrict and validate Base64 input at the application boundary, enforce input-size limits and limit unauthenticated access. Then patch as soon as possible, because neither flag is a substitute for the fix.

Did AI really find this flaw on its own?

No, and Calif does not claim that it did. A human researcher directed Codex at the parts of OpenJDK most likely to hide a bug, rejected most of what it returned, and kept pushing until it surfaced the Base64 finding. The firm calls the result a centaur hacker, part human and part AI. The model did the searching; the researcher did the judging.

How is Java4Shell different from PHP2Shell?

Both are critical memory-corruption flaws found with AI assistance by the same firm, Calif, within about a month of each other. PHP2Shell hit PHP's runtime and was fixed in October. Java4Shell hits OpenJDK's Base64 decoder and was fixed on November 17. Java4Shell reaches deeper, because Java runs the identity, build and data systems inside organizations, not just their websites. Our PHP2Shell coverage has the full details on the earlier flaw, and the free Devin plugin that patches it.

Java4Shell is a reminder that the flaws that hurt most are often not in the applications you chose but in the runtimes underneath them. The patch exists, the fix is free, and the cost of waiting is an attacker with a 65-character string and a server full of credentials. Update your Java runtimes today, restart the JVMs, and check the bundled runtimes hiding inside your containers and appliances. This is general information about a public security disclosure, not security advice for a specific system.

Sources

14 min read
25 views
edit_note Written by

Ratul Ahamed

Founder & Editor-in-Chief

Ratul Ahamed is the founder and editor of AI Core Updates, an independent site covering AI tools, models and pricing. He is a web developer based in Bangladesh and also runs All In One Tools, a free collection of browser-based utilities. Contact: [email protected]

Read all stories by Ratul Ahamed arrow_forward
verified_user Human-Reviewed Editorial

forum Comments (0)

Leave a Reply

chat_bubble_outline

No comments yet. Be the first to join the conversation!

Weekly AI Digest

Get our weekly AI tools digest

One email a week analyzing new AI tools, model updates, and practical workflows. Tested and summarized with zero fluff. Unsubscribe any time.

bolt
Hands-on AI Tool Reviews
Pricing math, limits, and alternatives.
verified_user
Strict Anti-Spam Policy
1-click unsubscribe at any time.
mark_email_unread

Subscribe to Digest

Sent weekly • No spam

person_outline
mail_outline

No spam ever. You can unsubscribe with a single click at any time.

cookie

Cookie Settings

We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Learn more