CloudflareKuber NandwaniAnnouncement
How Cloudflare WAF helps protect against Java4Shell (CVE-2026-114938)
Summary
Java4Shell (CVE-2026-114938) is a critical memory-corruption vulnerability in OpenJDK’s Base64 decoder, scoring 9.2 on CVSS 4.0. The flaw affects OpenJDK 17.0.6+ on x86-64 processors with AVX-512 VBMI support, allowing remote attackers to send malformed Base64 data that overwrites heap memory. Calif demonstrated pre-authentication remote code execution against Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins, and PingFederate. Cloudflare released six new WAF managed rules for paid plans that detect malformed Base64 input patterns, enabled by default in Log mode to avoid false positives. The WAF is an additional defense layer; the only complete fix is to update the Java runtime and restart affected services.
Context
Java4Shell (CVE-2026-114938) is a critical memory-corruption vulnerability in OpenJDK’s Base64 decoder, scoring 9.2 on CVSS 4.0. It affects OpenJDK 17.0.6+ on x86-64 processors with AVX-512 VBMI support. The flaw allows remote attackers to send malformed Base64 data that overwrites heap memory, leading to information disclosure and remote code execution. Calif demonstrated pre-authentication RCE against Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins, and PingFederate. Cloudflare’s WAF rules are an additional defense layer, not a patch replacement.
Approach / What changed
Cloudflare released six new managed WAF rules (in the Cloudflare Managed Ruleset) that detect malformed Base64 input patterns associated with Java4Shell. The rules are enabled by default with the Log action on Pro, Business, and Enterprise plans, allowing customers to review matches in Security Events before switching to Block. For Business and Enterprise, WAF attack score adds a machine learning layer to catch variations and bypass attempts.
Takeaways
Java4Shell is a memory-corruption bug in OpenJDK’s Base64 intrinsic on x86-64 with AVX-512 VBMI; it allows remote code execution via malformed Base64 input.
Cloudflare’s WAF managed rules detect malformed Base64 patterns but are in Log mode by default; customers must review and switch to Block to avoid false positives.
Patching the Java runtime and restarting services is the only complete fix; JVM flags like -XX:-UseBASE64Intrinsics are temporary mitigations that reduce performance.
FAQ
Which systems are affected by Java4Shell?
The vulnerability affects OpenJDK 17.0.6 or newer on x86-64 processors with AVX-512 VBMI support (Intel Ice Lake, Sapphire Rapids, Emerald Rapids, Granite Rapids; AMD EPYC and Ryzen Zen 4+). ARM64 processors are not affected. The system must decode attacker-controlled Base64 data with the standard Java decoder.
Can I mitigate Java4Shell without patching?
Yes, two JVM startup flags can mitigate without patching: -XX:-UseBASE64Intrinsics disables hardware-accelerated Base64 decoding, and -XX:UseAVX=2 disables AVX-512. Both require a restart and may reduce performance for Base64-heavy workloads. They are temporary measures, not replacements for updating the Java runtime.
Why are the WAF rules in Log mode by default?
The WAF rules are enabled in Log mode by default because malformed Base64 input and some benign application-specific token formats can resemble exploitation attempts. Blocking by default could disrupt legitimate traffic. Customers should review matches in Security Events and switch to Block only after confirming no false positives.
Source and freshness
- Source
- blog.cloudflare.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.