Download the latest Vulnerability & Exploitation Report

Download now
Announcement

Java4Shell virtual patch: free WAF rule for CVE-2026-114938

Java4Shell (CVE-2026-114938) is a heap overflow in the OpenJDK Base64 decoder that gives attackers pre-authentication remote code execution on Keycloak, Jira, Confluence, Artifactory, Jenkins, and PingFederate. Update Java first. Until you can, the free CrowdSec rule crowdsecurity/vpatch-CVE-2026-114938 blocks the malformed Base64 that triggers the bug, as a stopgap, not a fix.

OpenJDK and Oracle disclosed the bug on 17 November 2026 and rated it 8.1 (CVSS 3.1); the Calif.io researchers who found it rate it 9.2 (CVSS 4.0). As of 18 November 2026, no exploitation in the wild has been reported, and it is not in the CISA KEV catalog.

What is Java4Shell, and am I affected?

You are affected if a Java 17, 21, 25, or 27 service runs on an x86-64 CPU with AVX-512 VBMI and decodes untrusted Base64 with java.util.Base64. The bug sits in hand-written assembly that the JVM uses to decode Base64 fast; it only exists on Intel Ice Lake and later and AMD Zen 4 and later, and only once the JVM has compiled that code, which any busy service does. ARM servers (Graviton, Ampere, Apple Silicon), Java 11 and Java 17.0.0 to 17.0.5 are not affected.

Java lineAffectedFixed in (Oracle build)
27up to 27.0.127.0.1.1
25up to 25.0.525.0.5.1
21up to 21.0.1321.0.13.1
1717.0.6 to 17.0.2117.0.21.1
8Oracle 8u511b33-perf onlysee Oracle advisory
11not affectednot needed

Oracle GraalVM for JDK 17 and 21 and GraalVM Enterprise Edition 21.3.20.0.3 are affected too (NVD). Other OpenJDK builds (Temurin, Corretto, Zulu, Microsoft, Liberica) carry the same code: use your vendor’s fixed release.

How does a Java4Shell attack work?

The attacker sends a malformed Base64 string that ends in = and whose length is not a multiple of 4, anywhere the application decodes Base64: a Basic auth header, a JWT, a cookie, a SAML or OAuth parameter. The decoder works in 64-character blocks; when 1 to 3 characters are left over, and the last one is =, it computes a negative output size and writes 64 bytes where it should write none, 62 of them past the end of its buffer. Java then rejects the input, but the neighbouring heap memory is already corrupted.

The characters themselves do not matter. Public proofs of concept send 64 or 128 A followed by =, because A decodes to zero bytes and makes the overflow easy to check; real exploits vary the characters to choose the bytes they write. A single request usually just crashes the JVM. Turning it into code execution takes many requests to shape the heap, which Calif.io demonstrated against six products in their default configuration.

A defence that looks for runs of A is therefore bypassed by changing one character.

Can a WAF stop Java4Shell?

Yes, for the places it inspects: the CrowdSec AppSec rule crowdsecurity/vpatch-CVE-2026-114938 blocks the malformed Base64 in auth headers, cookies, and the parameters public exploits use, before the request reaches the JVM. It matches the shape of the trigger, not a payload: a Base64 or Base64url token of 32 or more characters, ending in = or ==, whose length is not a multiple of 4. Valid Base64 always has a length divisible by 4, so legitimate tokens cannot match.

The rule inspects:

  • The Authorization and Proxy-Authorization headers, each JWT segment on its own;
  • Every cookie value, including JWT cookies such as Keycloak’s KEYCLOAK_IDENTITY;
  • Specific query, form, and JSON body parameters targeted by public exploits against Keycloak, Jira, and other Java applications.

We tested the rule against both public proofs of concept and their variants, and against a large dataset of legitimate Base64 values, JWTs, and cookies.

How do I protect Keycloak, Jenkins, Jira and other Java services?

Update the JDK, restart every JVM, and rebuild container images; that is the only fix. If you cannot do it today, disable the vulnerable code path with a JVM flag, and put the CrowdSec virtual patch in front of exposed services, starting with identity and CI/CD systems such as Keycloak, PingFederate, Jenkins, Artifactory, Jira, and Confluence.

OptionWhat it doesLimits
Update the JDK (17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1 or your vendor’s equivalent)Removes the bugNeeds a restart; bundled runtimes inside products need their own update
JVM flag -XX:-UseBASE64IntrinsicsTurns off the vulnerable decoder on any architectureNeeds a restart; containers must be recreated, not just restarted
CrowdSec virtual patch crowdsecurity/vpatch-CVE-2026-114938Blocks the trigger in HTTP requests; no restart of the Java serviceCovers the inspected headers, cookies, and parameters only; not a fix

New to the CrowdSec WAF? Follow the AppSec quickstart guide first, then install the rule.

If you run the CrowdSec WAF with the crowdsecsecurity/appsec-virtual-patching collection, there is nothing to install: the rule is part of that collection. It arrives with the next hub update, which Linux packages run once a day. To get it right away, run cscli hub update, then cscli hub upgrade, and restart CrowdSec, as explained in how to get a new hub item right now. Docker, Kubernetes, and Windows have no scheduled hub update, so run these steps yourself there.

Java4Shell FAQ

Is Java4Shell exploited in the wild?

Not as of 18 November 2026: no exploitation has been reported, and CVE-2026-114938 is not in the CISA KEV catalog. Public proofs of concept that crash the JVM exist; the researchers have withheld their product-specific RCE chains.

Can a WAF stop Java4Shell?

A WAF can block the malformed Base64 that triggers Java4Shell in the places it inspects, such as auth headers, cookies, and known parameters. It cannot see Base64 decoded from other inputs or from outbound connections, so it is a stopgap until you update Java.

How do I check if a server is affected?

Run java -version for the JDK version and grep -o avx512vbmi /proc/cpuinfo | head -1 for the CPU: an affected JDK on a CPU that prints avx512vbmi is exposed.

Is Java 11 affected by Java4Shell?

No. The vulnerable decoder reached Java 17 in 17.0.6; Java 11 and Java 17.0.0 to 17.0.5 do not have it.

Are ARM servers affected?

No. The bug is in x86-64 AVX-512 code; ARM64 servers such as AWS Graviton are not affected.

Does the CrowdSec rule block legitimate traffic?

It shouldn’t. Valid Base64 always has a length divisible by 4, so legitimate tokens don’t match the rule, and we carefully tested it against a large dataset of legitimate traffic before releasing it 

Is Java4Shell related to Log4Shell?

No. Log4Shell (CVE-2021-44228) was an injection flaw in the Log4j library; Java4Shell is a memory corruption bug in the JDK itself, so updating libraries does not fix it.

References

WRITTEN BY

You may also like

Analyse de l’attaque de la supply chain TanStack
Announcement

Analyse de l’attaque de la supply chain TanStack

Philippe Humeau, PDG de CrowdSec, revient en détail sur l’attaque de la chaîne d’approvisionnement de 2026, depuis la fuite du code source et l’enquête technique jusqu’aux enseignements tirés.

TanStack Supply Chain Attack Analysis
Announcement

TanStack Supply Chain Attack Analysis

CrowdSec CEO Philippe Humeau shares the full story behind the 2026 supply chain attack, from the source code leak and forensic investigation to the lessons learned.

CrowdSec Statement: Source Code Exposure in May 2026
Announcement

CrowdSec Statement: Source Code Exposure in May 2026

CrowdSec update on a source code exposure that occurred in May 2026, including the scope, impact, investigation, and security measures taken.