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 line | Affected | Fixed in (Oracle build) |
|---|---|---|
| 27 | up to 27.0.1 | 27.0.1.1 |
| 25 | up to 25.0.5 | 25.0.5.1 |
| 21 | up to 21.0.13 | 21.0.13.1 |
| 17 | 17.0.6 to 17.0.21 | 17.0.21.1 |
| 8 | Oracle 8u511b33-perf only | see Oracle advisory |
| 11 | not affected | not 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
AuthorizationandProxy-Authorizationheaders, 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.
| Option | What it does | Limits |
|---|---|---|
| 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 bug | Needs a restart; bundled runtimes inside products need their own update |
JVM flag -XX:-UseBASE64Intrinsics | Turns off the vulnerable decoder on any architecture | Needs a restart; containers must be recreated, not just restarted |
| CrowdSec virtual patch crowdsecurity/vpatch-CVE-2026-114938 | Blocks the trigger in HTTP requests; no restart of the Java service | Covers 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
- CrowdSec Hub: crowdsecurity/vpatch-CVE-2026-114938 and the appsec-virtual-patching collection
- CrowdSec AppSec documentation
- OpenJDK vulnerability advisory, 17 November 2026
- CVE-2026-114938 on NVD
- Oracle Critical Patch Update, November 2026
- CISA Known Exploited Vulnerabilities catalog
- OpenJDK fix commit (JDK-8393212)
- Java4Shell: what we know now, Upwind



