Java4Shell: a critical Java flaw lets attackers hit servers without a password using a simple Base64 string

Technology

On November 17, Oracle and the OpenJDK project released patches for CVE-2026-114938, a vulnerability dubbed "Java4Shell". The flaw sits in Java's Base64 decoder and affects versions 17, 21, 25 and 27 when they run on Intel or AMD processors with the AVX-512 VBMI extension. A malformed Base64 string can crash the application and, in some cases, let an attacker run code without logging in.

The US cybersecurity agency (CISA) has urged organizations to patch "immediately", starting with Internet-facing systems. The good news is that the real scope is narrower than the name suggests: Java 8 and 11 are not affected, neither are ARM servers, and no real-world attacks have been seen so far.

What happened

  • November 17: Oracle ships the fix in its November critical patch update and CISA issues an alert. Amazon (Corretto) and Azul release patches the same day.
  • Who found it: the security firm Calif, which according to Qualys and Azul discovered it with the help of AI in a matter of hours.
  • November 18: Red Hat, Eclipse Temurin and Microsoft were still preparing their fixed builds, according to Palo Alto Networks.

How it works

Base64 is the usual way to send data as text: it appears in authentication headers, session tokens, forms and file uploads. Since version 17.0.6, Java has sped up that decoding with special processor instructions (AVX-512 VBMI). That optimized routine miscalculates the size of the result when the input ends with incorrect = padding and writes 62 bytes outside the reserved memory, before Java gets to reject the data.

Because many applications decode Base64 before checking who is making the request, the attacker needs no username or password. The researchers say they achieved unauthenticated code execution in Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate in their default configurations, although they have not published those exploits.

Who is affected

  • Affected: Java 17.0.6 and later, 21, 25 and 27 from any OpenJDK-based distribution (Oracle, Temurin, Corretto, Zulu, Red Hat, Microsoft…), only on x86-64 processors with AVX-512 VBMI.
  • Not affected: standard Java 8 and 11, Java 17.0.0 to 17.0.5, ARM machines (Graviton, Apple Silicon) and processors without that extension, such as AMD Zen 2 and Zen 3 or Intel's Skylake server chips.
  • No patch: unsupported branches (18 to 20, 22 to 24 and 26). You need to move to a supported version.

Is it as bad as it sounds?

Sources disagree on the score: the researchers rate it 9.2 out of 10 (CVSS 4.0) and Oracle 8.1 (CVSS 3.1). Crashing a server is easy; taking it over is considerably harder. OX Security estimates that fewer than 0.12% of Java installations are a realistic target for code execution and around 0.8% can be crashed remotely, although that is its own calculation and no independent lab has confirmed it. As of November 18 there were no known real-world attacks and no public exploit, and CISA had not added it to its catalog of exploited flaws.

What to do now

  1. Check the version: run java -version. On Oracle JDK the fixed releases are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1; other distributions use their own numbering, so check your vendor's advisory.
  2. Check the processor (Linux): grep -c avx512vbmi /proc/cpuinfo. If it returns 0, that machine does not run the vulnerable code. Use this to prioritize, not to skip updating.
  3. Update and restart Java applications, starting with those exposed to the Internet.
  4. If you can't update yet: start the JVM with -XX:-UseBASE64Intrinsics, which disables only the affected routine. The alternative -XX:UseAVX=2 also works, but costs more performance and stops the JVM from starting on ARM.
  5. Review containers and products that bundle Java: a Docker image with an old JDK won't fix itself; rebuild it on an updated base. Many applications ship their own Java and don't show up in inventories.
  6. Watch for signs: unexpected JVM crashes, hs_err_pid*.log files and bursts of Base64 decoder errors.

What to watch next

  • The pending patches from Red Hat, Temurin, Microsoft and the Linux distributions.
  • The release of the exploits Calif is holding back, and the fake proofs of concept on GitHub that OX Security is already warning about.
  • Whether CISA adds it to its Known Exploited Vulnerabilities catalog.

The same research team is behind another recent advisory: read about PHP2Shell, the two critical flaws in PHP's core.

Conclusion: Java4Shell is not a new Log4Shell, because it depends on the Java version and the processor, but where the conditions are met a single unauthenticated request is enough to take the service down. Updating, or disabling the affected routine until the patch arrives, closes the hole.

Sources and documentation

Share