On November 17, 2026, Calif disclosed Java4Shell (CVE-2026-114938), a memory-corruption flaw affecting the Base64 decoder in OpenJDK, the predominant Java runtime environment. The vulnerability carries a CVSS 4.0 score of 9.2 out of 10, marking it as Critical. OpenJDK released a security advisory the same day, with Oracle publishing patched builds through its November 2026 Critical Patch Update at 21:00 UTC.
The flaw permits unauthenticated remote attackers to transmit malformed Base64 data to Java applications, causing memory corruption adjacent to the decoded output. Calif demonstrated the ability to leak heap memory—comparable to Heartbleed—and achieve remote code execution. The researchers showed pre-authentication remote code execution against Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate in default configurations, and post-authentication remote code execution against Apache Kafka, Apache Solr, Elasticsearch, Gerrit, and Spinnaker.
Cloudflare has deployed new detection rules within the Cloudflare Managed Ruleset to identify malformed Base64 input patterns linked to this vulnerability. These rules are accessible on Pro, Business and Enterprise plans and ship enabled by default in Log mode, since benign application-specific token formats can resemble attack patterns. Enabling Block mode by default could interrupt legitimate traffic. Customers can examine matching requests in Security Events and adjust rule actions to Block after confirming no impact on legitimate operations.
The WAF functions as an additional defensive layer, not a substitute for patching. Java4Shell can be exploited through channels outside WAF visibility, such as outbound TLS responses, making runtime updates the only complete remediation. Cloudflare's analysts are tracking attack activity and will refine rules as new exploitation methods emerge. Rule modifications can be tracked via the WAF changelog, with additional details available on the Cloudflare Zero Wire briefing. No evidence of Java4Shell exploitation has been detected on Cloudflare infrastructure to date.
Understanding the vulnerability
Base64 encoding is widely used to represent binary data in text form. Java applications decode Base64 when handling authentication headers, tokens, file uploads and network messages. To accelerate decoding, OpenJDK uses specialized machine code called intrinsics. On compatible x86-64 processors, the Base64 intrinsic leverages AVX-512 instructions to process 64 bytes simultaneously.
The defect resides in handwritten assembly code managing the final input characters. When the input tail contains padding characters (=) in positions where valid Base64 would never place them, the routine computes a negative output length. This invalid length results in a full 64-byte write. For a 65-character input consisting of 64 characters followed by a single =, OpenJDK allocates a 50-byte output array then writes 62 bytes beyond its boundary.
Java eventually rejects the input as invalid and raises an exception. However, neighboring memory has already been corrupted by that point. An application's own input validation cannot prevent this, since the corruption occurs within the decoder before the application can validate the data.
The simplest trigger consists of 64 A characters followed by =. On OpenJDK 17, the trigger requires 128 characters followed by =, as the threshold for activating the fast code path is higher.
Exploitation demands more than straightforward execution. The overwritten bytes are largely fixed values, with attackers controlling only the write location. To construct a functional exploit, Calif arranged the Java heap so the overflow enlarged neighboring arrays, enabling first a heap memory read and then controlled byte writes. Each target application requires its own exploit chain. Calif reported developing its first working local exploit in approximately three hours with AI agent assistance, suggesting other attackers will construct exploit chains rapidly.
Affected systems
Java4Shell impacts a system only when all conditions below are present:
- OpenJDK 17.0.6 or later, including distributions built from OpenJDK: 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. Consult Oracle's advisory for the complete list of affected Oracle builds.
- x86-64 architecture with AVX-512 VBMI support, such as Intel Xeon Ice Lake, Sapphire Rapids, Emerald Rapids and Granite Rapids, or AMD EPYC and Ryzen Zen 4 or newer. ARM64 processors are not vulnerable.
- The application decodes attacker-controlled Base64 data using the standard Java decoder.
Many applications embed their own Java runtime, and container images include a fixed Java Development Kit (JDK). Upgrading the system Java package does not update those embedded copies, nor does it replace a Java virtual machine (JVM) already in operation. Each updated service requires a restart.
Temporary mitigation without immediate patching
Calif documents two JVM startup flags that disable the vulnerable code path if immediate updates are not feasible:
-XX:-UseBASE64Intrinsicsdisables hardware-accelerated Base64 encoding and decoding.-XX:UseAVX=2disables AVX-512. Apply this flag only on x86-64 hosts. OpenJDK on ARM does not recognize it and will fail to start.
Both flags require a restart and may degrade performance for workloads that process large Base64 volumes. They provide time to apply patches but do not replace the update.
WAF protection during patching
Updating every Java runtime takes time, particularly when JDKs are bundled inside applications and container images. Cloudflare WAF can reduce exposure during patching. A new managed rule, available on paid plans and enabled in Log mode by default, identifies the malformed Base64 input triggering Java4Shell. For Business and Enterprise customers, WAF attack score provides a machine learning layer that evaluates each request for remote code execution payloads, helping detect variations and bypass attempts that signature rules may miss.
New managed rules
Protection for paid plans has been released as part of the Cloudflare Managed Ruleset (Ruleset ID efb7b8c949ac4650a09736fc376e9aee). The rule is enabled by default with the Log action, since blocking by default could cause false positives on legitimate Base64 traffic. To review matches, navigate to Security > Security Analytics > Events and filter by the rule ID. If matches are not legitimate traffic, change the rule action to Block: go to Security > Settings, edit the Cloudflare Managed Ruleset, search for CVE-2026-114938 and set the rule action to Block. Alternatively, follow the link to review configuration on the Zero Wire briefing.
- Java4Shell - Malformed Base64 Header - CVE-2026-114938
- Java4Shell - Malformed Base64 Query Value - CVE-2026-114938
- Java4Shell - Malformed Base64 Body Value - CVE-2026-114938
- Java4Shell - Malformed Base64 Path Segment - CVE-2026-114938
- Java4Shell - Malformed Base64url JWT Component - CVE-2026-114938
- Java4Shell - Malformed Base64 WebAuthn Value - CVE-2026-114938
Cloudflare is developing a rule for the Cloudflare Free Managed Ruleset and will update this post upon availability.
A WAF can block the exploit when malformed Base64 arrives in an HTTP request passing through Cloudflare. However, it cannot block every path to the vulnerable decoder, including:
- Encoded or nested data. The Base64 value may be wrapped inside another encoding or compressed format that the application unpacks before decoding.
- Non-HTTP protocols. Some affected products, such as the Apache Kafka broker, accept traffic over their own protocols.
- Outbound connections. Calif also shared a client-side exploit: a Java program that opens a TLS connection to a malicious server can be compromised, even if it exposes no service of its own.
- Traffic that bypasses Cloudflare. This includes internal traffic between services.
Adding defense-in-depth with WAF attack score
While the managed rule is the primary mechanism to block malformed Base64 triggers at the edge, Cloudflare WAF Attack Score (and specifically its remote code execution sub-score cf.waf.score.rce available on Enterprise plans) can provide an additional, complementary protection layer.
Because CVE-2026-114938 (Java4Shell) is a binary heap-corruption vulnerability, an attacker rarely achieves full, reliable remote code execution with a single 65-byte (or 129-byte) trigger string alone. On the wire, that initial trigger appears as an opaque, malformed Base64 string containing heap-corruption bytes rather than traditional web-layer injection syntax. Consequently, machine learning models trained on application-layer injection patterns will not flag the raw Base64 trigger in isolation.
Instead, converting a bounded JVM heap overflow into remote code execution over HTTP almost always requires a multi-stage or multi-parameter exploit chain, which creates more fingerprints that WAF Attack Score can inspect and flag, including:
- Heap Grooming and Triggering: To corrupt a predictable adjacent object on the JVM heap (such as a String or byte[] length header), attackers often send repetitive parameters or headers alongside the malformed Base64 payload to shape memory layout before triggering the out-of-bounds write.
- Second-Stage Payloads: Once heap corruption gives the attacker control over execution flow or object references, the exploit still needs commands, scripts, or Java gadgets to run. If an exploit chain pairs the initial heap-corruption trigger with a second-stage payload such as shell execution primitives (/bin/sh -c, cmd.exe, reverse-shell strings) or Java class-loading gadgets (java.lang.Runtime, ProcessBuilder, serialized object streams) tucked into another header, query parameter, or request body, cf.waf.score.rce can detect and score that secondary payload as malicious.
- Post-Exploitation Activity: Even if an initial heap-read or corruption request slips past edge filters, subsequent HTTP requests attempting to interact with an in-memory webshell or pass OS commands to the compromised JVM remain directly visible to WAF Attack Score.
Deployment and patching strategy
Because sophisticated in-memory exploits can still execute raw shellcode or manipulate bytecode without ever sending plaintext shell commands over HTTP, WAF Attack Score should be used alongside explicit Base64 rules and JVM patching.
Additional information on deploying Managed rules and attack score is available in the WAF guide. In summary:
- Set the CVE-2026-114938 rule in the Cloudflare Managed Ruleset (Pro plan and above) to Block. It is enabled in Log mode by default, so review its matches in Security Events first. Use the links on the Cloudflare Zero Wire page to review your rules status.
- Layer Attack Score to get ML-based remote code execution (RCE) detection: create a custom rule blocking or challenging requests with a low RCE attack score (for example,
cf.waf.score.rce le 20on Enterprise plans, orcf.waf.score.class eq "attack"on Business plans) to catch multi-stage exploit chains and post-exploitation command traffic. - Remediate at runtime: Upgrade to patched OpenJDK builds (or set
-XX:+UnlockDiagnosticVMOptions -XX:-UseBASE64Intrinsicsas a temporary workaround) to eliminate the vulnerable AVX-512 code path entirely. Follow the OpenJDK advisory and Oracle's Critical Patch Update and install your Java vendor's fixed release as soon as possible. For a prompt you can give an AI agent to inventory your Java runtimes, see the Java4Shell page on Cloudflare Zero Wire.
Cloudflare's internal response
Cloudflare operates Java workloads, so upon Java4Shell disclosure the organization reviewed its own systems. The vulnerability can only be triggered in specific hardware configurations—namely x86-64 processors supporting AVX-512 VBMI—so exposure exists only when both conditions are met. Investigation revealed that most Cloudflare Java workloads are not scheduled on vulnerable systems; immediate protective action was taken for the remainder.
Approximately one hour after patches became available, Cloudflare began rolling out a JVM startup option disabling the accelerated Base64 routine containing the bug across all Java workloads, allowing decoding to fall back to the standard implementation. As a precaution, the organization is rolling out its patched configuration to all machines, regardless of hardware. No evidence of Java4Shell exploitation has been detected on Cloudflare infrastructure.
Update all Java runtimes immediately
Java4Shell converts a performance optimization in the Java runtime into a remote code execution pathway. With technical details now public, exploit attempts are expected to follow quickly. The solution is to update every Java runtime and restart services using it. While patching proceeds, review the new managed rule's matches and switch it to Block if you are on a paid plan, and use attack score to catch remote code execution payloads that signatures may miss.
Cloudflare's WAF analysts will continue updating protections as new techniques emerge. Follow the WAF changelog for rule updates and the Java4Shell page on Cloudflare Zero Wire for the latest information on this vulnerability.