· via Cloudflare blog
Java4Shell: critical OpenJDK Base64 decoder flaw enables pre-auth remote code execution
A memory-corruption flaw in OpenJDK's AVX-512 Base64 decoder lets unauthenticated attackers overwrite heap memory and run code. Oracle and OpenJDK shipped fixes, and Cloudflare released WAF rules that detect the malformed input.

What happened
On November 17, 2026, security research firm Calif disclosed a memory-corruption flaw in OpenJDK's Base64 decoder, tracked as CVE-2026-114938 and quickly branded Java4Shell. According to Cloudflare's blog post, the vulnerability scores 9.2 out of 10 under CVSS 4.0. OpenJDK published a security advisory the same day, and Oracle included patched builds in its November 2026 Critical Patch Update.
The flaw lets a remote attacker send malformed Base64 data to a Java application and overwrite the memory sitting next to the decoded output. Calif developed that overwrite into a heap memory leak reminiscent of Heartbleed, and from there into remote code execution. The firm demonstrated pre-authentication code execution against Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate in their default configurations, and post-authentication code execution against Apache Kafka, Apache Solr, Elasticsearch, Gerrit and Spinnaker.
Inside the decoder
Java applications decode Base64 constantly: authentication headers, tokens, file uploads and many network messages. To speed this up, OpenJDK replaces hot decoding paths with hand-written machine code known as intrinsics. On supported x86-64 processors, that intrinsic uses AVX-512 instructions to process 64 bytes at a time.
Cloudflare explains that the bug lives in the assembly routine handling the tail of the input. When padding characters (=) appear where valid Base64 never places them, the routine computes a negative output length, which becomes a full 64-byte write. A 65-character input, made of 64 characters followed by a single =, makes OpenJDK allocate a 50-byte output buffer and then write 62 bytes past its end. The decoder eventually rejects the input and throws an exception, but by then neighbouring memory has already been corrupted. Application-level validation offers no protection, because the overwrite happens inside the decoder before the application can reject the data.
The simplest trigger is 64 'A' characters followed by '='. On OpenJDK 17, 128 characters are needed before the '=', because the fast path engages at a higher threshold. Exploitation is not automatic: most overwritten bytes are fixed values, and the attacker mainly controls where the write lands. Calif arranged the Java heap so the overflow enlarged neighbouring arrays, first gaining a way to read heap memory and then a way to write chosen bytes, with a separate chain required for each target. The firm built its first working local exploit in roughly three hours with the help of AI agents, a pace Cloudflare expects other attackers to match.
Who is affected
Per Cloudflare's write-up, exploitation requires three conditions to hold at once: a runtime based on OpenJDK 17.0.6 or newer, including Amazon Corretto, Eclipse Temurin, Microsoft Build of OpenJDK, Azul Zulu, BellSoft Liberica, SAP SapMachine, Red Hat OpenJDK, Oracle OpenJDK, Oracle Java SE and Oracle GraalVM for JDK; an x86-64 processor with AVX-512 VBMI support, such as Intel Xeon Ice Lake or newer generations or AMD EPYC and Ryzen chips from Zen 4 onward (ARM64 is unaffected); and an application that decodes attacker-controlled Base64 with the standard Java decoder.
Patching has a practical catch. Many applications bundle their own Java runtime and container images ship a fixed JDK, so updating the system package updates neither, and a JVM already running is not replaced by an update. Every updated service needs a restart.
Mitigation and WAF coverage
For teams that cannot patch immediately, Calif documents two JVM startup flags that remove the vulnerable code path: -XX:-UseBASE64Intrinsics disables hardware-accelerated Base64 decoding, and -XX:UseAVX=2 turns off AVX-512 on x86-64 hosts only, since ARM JVMs will fail to start with it. Both require a restart and may reduce performance for Base64-heavy workloads. They buy time; they are not a fix.
Cloudflare has added six managed rules to its Managed Ruleset to detect the malformed Base64 patterns, covering headers, query values, body values, path segments, Base64url JWT components and WebAuthn values. Available on Pro, Business and Enterprise plans, the rules ship enabled with the Log action because malformed input and some benign application-specific token formats look alike, so blocking by default could disrupt legitimate traffic. Customers can review matches in Security Events and switch the action to Block once confirmed safe. Business and Enterprise plans add the machine-learning WAF attack score as a second layer, and a rule for the Free Managed Ruleset is in progress.
Cloudflare stresses that the WAF is a stopgap, not a substitute for the patch: it cannot see Base64 wrapped inside another encoding, traffic over non-HTTP protocols, or paths such as outbound TLS responses. The company says it has seen no indication of exploitation on its own infrastructure so far.
Why it matters
Java underpins enormous enterprise estates, and the products shown vulnerable in default configurations include identity providers and CI/CD servers where unauthenticated code execution is the worst-case outcome. Because Base64 decoding sits in front of authentication itself, application-level checks cannot help. The reported three-hour, AI-assisted path to a working exploit suggests patch windows are shrinking while inventory problems, such as JDKs bundled inside applications and container images, make actual remediation slow. JVM flags and WAF rules are useful bridges, but the only complete fix is updating and restarting every affected Java runtime.
- #java
- #security
- #openjdk
- #cloudflare
- #vulnerability