Cloudflare has added managed web application firewall rules to detect malformed Base64 input associated with Java4Shell, a critical OpenJDK memory-corruption vulnerability disclosed on November 17, 2026. The rules are available to customers on Pro, Business and Enterprise plans and are enabled in Log mode by default. Cloudflare advises customers to review detected requests before switching the rules to Block, since unusual but legitimate application traffic could match.
Java4Shell, tracked as CVE-2026-114938, received a CVSS 4.0 score of 9.2. Calif, the security research company that disclosed the flaw, demonstrated ways to turn the memory corruption into heap-memory disclosure and remote code execution. The issue is in OpenJDK’s Base64 decoder and affects Java applications only under specific runtime, processor and input conditions.
How the vulnerability works
Base64 decoding is used to process data in application inputs such as authentication headers, tokens, file uploads and network messages. To accelerate decoding, OpenJDK can use specialized machine code, or an intrinsic. On supported x86-64 processors, the affected routine uses AVX-512 instructions. The flaw is in hand-written assembly that handles the end of an input: certain invalid placements of Base64 padding can produce an incorrect output length and an out-of-bounds memory write.
For example, the disclosed trigger on most affected configurations is 64 “A” characters followed by an equals sign. OpenJDK 17 requires a longer input of 128 characters followed by an equals sign to reach the vulnerable fast path. In the reported example, the runtime allocates a 50-byte output array for a 65-character input, then writes 62 bytes beyond its end. The decoder eventually rejects the malformed data, but the write has already occurred. Application-level validation does not prevent corruption inside the decoder.
Calif demonstrated pre-authentication remote code execution in default configurations of Keycloak, Atlassian Jira, Atlassian Confluence, JFrog Artifactory, Jenkins and PingFederate. It also demonstrated post-authentication exploitation against Apache Kafka, Apache Solr, Elasticsearch, Gerrit and Spinnaker. These demonstrations do not mean every deployment of those products is exposed: exploitation depends on the affected Java runtime, suitable processor hardware and an application path that decodes attacker-controlled data.
Exposure and remediation
The reported affected runtimes include OpenJDK 17.0.6 and newer, along with distributions built from OpenJDK. The processor must be x86-64 with AVX-512 VBMI support; ARM64 systems are not affected. Organizations should consult the relevant Java vendor’s advisory for the precise affected builds and install its patched release. Services need to be restarted to use an updated runtime.
Teams should also account for Java installations bundled with applications or included in container images. Updating a host’s system Java package will not update those copies, nor does it replace a JVM that is already running. Calif documented two temporary JVM startup options that disable the vulnerable code path: -XX:-UseBASE64Intrinsics and, on x86-64 only, -XX:UseAVX=2. These measures require a restart, can reduce performance for workloads that decode substantial Base64 data, and are not substitutes for patching. The AVX option is not recognized by OpenJDK on ARM.
What the WAF can and cannot do
Cloudflare’s Managed Ruleset includes detections for malformed Base64 in headers, query values, request bodies, path segments, Base64url JWT components and WebAuthn values. Customers can inspect matches in Security Events and change the action for CVE-2026-114938 to Block after confirming that legitimate requests will not be affected. Cloudflare said it was working on a rule for its Free Managed Ruleset.
The rules cover suspicious HTTP requests that pass through Cloudflare, not every way the vulnerable decoder can be reached. Coverage may be limited when data is nested inside another encoding or compressed format, when an application uses a non-HTTP protocol, when traffic bypasses Cloudflare, or when a Java client encounters malicious data in an outbound TLS connection. The vulnerability can therefore remain reachable even when an edge WAF is deployed.
Cloudflare also recommends WAF Attack Score as a complementary layer for eligible customers. The initial malformed Base64 trigger may not resemble familiar web-injection patterns, but a multi-stage exploit can include heap-grooming requests, secondary payloads or later command traffic. Cloudflare says Attack Score may help identify some such activity; it does not replace the explicit managed rules or runtime remediation.
Cloudflare reported that it found no indication of Java4Shell exploitation on its infrastructure. It said most of its Java workloads were not scheduled on vulnerable hardware and that it began rolling out a JVM option to disable the affected accelerated routine, followed by a patched configuration across machines as a precaution. For other operators, the central fix remains the same: inventory every Java runtime, apply the vendor’s patched build and restart the services that use it.