All articles

Java4Shell and Its Impact on Cassandra and Kafka

Yes, it has happened again and this time the vulnerability is in Java itself. Calif used AI to help find and exploit a memory-corruption bug in the JVM’s Base64 decoder. I expect more discoveries as researchers investigate software we’ve relied on for years. For Cassandra and Kafka operators the immediate question is how to identify and patch affected processes without disrupting the clusters.

Java4Shell is CVE-2026-114938, disclosed on 17 November 2026. Calif reports remote code execution against a Kafka broker after authentication but does not list Cassandra among its demonstrations. Both can run on an affected JVM. The disclosure credits Quang Luong for the research and Jenish Rakholiya for exploit improvements.

Check the Java process that is actually running

A package update or image rebuild does not patch a running JVM. Restart affected services with the corrected runtime and verify each replacement process. Information checked on 19 November 2026.

What Java4Shell Affects

Base64 represents binary data as text. HotSpot accelerates decoding with processor-specific routines called intrinsics, and the affected AVX-512 VBMI routine can corrupt JVM memory by writing beyond its output buffer when handling malformed input.

This is separate from Log4Shell and requires attention to the Java runtime rather than a Log4j update.

Three conditions determine whether an application can reach this particular vulnerability.

RequirementWhat to check
Affected Java buildIdentify the distribution and full build number of the running JVM, including runtimes bundled in images
Compatible processor and active intrinsicThe documented path requires x86-64 with AVX-512 VBMI and the relevant intrinsic enabled
Attacker-controlled input reaches the decoderReview application behaviour and vendor advisories rather than treating every Java process as equally exploitable

The CERT-EU advisory lists the required flags as avx512f, avx512bw, avx512vbmi and bmi2. Native ARM64 execution is unaffected by this flaw. For VMs and containers check the features visible to the JVM.

Affected Java Versions

The Java release and distributor’s build determine whether the runtime contains the flaw. These are the affected versions and fixes listed in the security advisory; vendor backports can use different package numbers.

Java releaseAffected buildsFixed version listed in the advisory
8Oracle’s 8u511-perf performance build is affected; do not treat every Java 8 distribution as affectedOracle 8u513
11Not listed as affected by this CVENo patch required for this CVE on the standard OpenJDK 11 line
1717.0.6 through 17.0.21 without a vendor fix17.0.21.1
21Through 21.0.13 without a vendor fix21.0.13.1
25Through 25.0.5 without a vendor fix25.0.5.1
27Through 27.0.1 without a vendor fix27.0.1.1

The Adoptium advisory confirms that its Java 8 and 11 builds are unaffected. Check your distributor rather than assuming Oracle’s performance-build exception applies to every Java 8 installation. Older unsupported Java releases are not cleared by their absence from this table.

Cassandra and Kafka Versions

For Cassandra 5.0, including 5.0.9, Java 11 is unaffected by this flaw while an unpatched Java 17 runtime can be affected. The table maps selected platform releases to their supported Java versions rather than claiming an exploit exists for every combination.

Platform releaseSupported Java versionsJava4Shell runtime exposure
Cassandra 4.0 / 4.18 and 11Java 11 is unaffected; check the Java 8 vendor and performance-build exception above
Cassandra 5.011 and 17Affected Java 17 builds require remediation; Java 11 is unaffected
Cassandra 6.0 development branch11, 17 and 21Affected Java 17 and 21 builds require remediation, including on test clusters
Kafka 3.98, 11, 17 and 21; Java 25 is best-effortAffected Java 17, 21 and 25 builds require remediation; check the Java 8 exception
Kafka 4.0 servers17 and 21Both Java lines have affected builds
Kafka 4.4 servers17, 21 and 25All three Java lines have affected builds

Our Cassandra JVM guide explains the per-release runtime choices. Cassandra 6.0 remains development work rather than an upgrade recommendation. Kafka 4.x retains Java 11 support for some client modules, but not its brokers or Connect workers. Check those applications separately from the server runtime and use the Kafka documentation for deployment guidance.

An affected build still needs the CPU features and reachable decoding path described above for exploitation. Patch within your supported Java line rather than downgrading Java or changing the Cassandra or Kafka major version to avoid this CVE.

Kafka Exposure

I’d prioritise affected Kafka brokers even on private networks because an authenticated attacker is relevant to a shared cluster where several teams have credentials.

The demonstration does not mean that publishing a Base64-looking record to any topic executes code. An application path must pass attacker-controlled input to the affected decoder.

Java processScope of the review
Kafka brokersReported post-authentication exploitation makes affected broker runtimes a priority
KRaft controllersCheck their runtime separately, including dedicated controller hosts and images
Kafka Connect workersInclude connector libraries and any authentication or external-service integrations
Schema Registry and REST servicesCheck each service’s JDK and vendor guidance rather than assuming the broker update covers them
Java producers, consumers and Streams applicationsReview application runtimes and their decoding paths independently of the server fleet
ZooKeeper in older deploymentsInclude its JVM if it remains part of the installation

Apart from the broker demonstration this is an inventory checklist, not a list of proven exploit paths. Each service may use a different JDK.

Keep the controls described in our Kafka security documentation in place throughout remediation without treating TLS or authentication as a replacement for patching.

Cassandra Exposure

I have not verified a Cassandra-specific Java4Shell exploit, but that does not establish that an affected runtime is safe. Check each node’s JDK alongside authentication extensions and surrounding Java services.

Cassandra 5.0.9’s PasswordAuthenticator reads SASL PLAIN credentials as NUL-separated fields and converts them to UTF-8 strings. Handling credentials therefore does not itself establish a route through Java’s Base64 decoder.

That is a check of one implementation rather than a security audit of Cassandra. Custom authenticators and gateways need their own assessment.

I’d patch an affected runtime without waiting for a Cassandra exploit demonstration and stay within the Java versions supported by the Cassandra release.

Check the Running Runtime

The service may use a different Java installation from your shell. Run these read-only checks as the service user with a compatible JDK’s jcmd, replacing 12345 with the actual PID in the appropriate container namespace.

PID=12345
jcmd "$PID" VM.version
jcmd "$PID" VM.flags -all | grep -E 'UseBASE64Intrinsics|UseAVX'
readlink -f "/proc/$PID/exe"

See the jcmd requirements if attach fails. Use startup records and image inventory where attach is unavailable rather than interpreting failure as a clean check.

On Linux check which relevant CPU flags are exposed.

grep -m1 '^flags' /proc/cpuinfo | tr ' ' '\n' \
  | grep -E '^(avx512f|avx512bw|avx512vbmi|bmi2)$'

These checks establish runtime and hardware information rather than remote exploitability. Include standby hosts and autoscaling images in the review.

Patch or Disable the Intrinsic

Check your Java distributor’s advisory for its patched build. Oracle released JDK 17.0.21.1 and JDK 21.0.13.1 on 17 November. Other distributors may use different package revisions or backports, so “Java 17” alone cannot establish patch status.

In the OpenJDK advisory check this CVE’s row because the document covers several vulnerabilities with different affected versions.

Where a patched runtime cannot be deployed immediately, CERT-EU documents this temporary JVM-startup mitigation.

-XX:+UnlockDiagnosticVMOptions
-XX:-UseBASE64Intrinsics

Test startup on the exact Java build and apply the flags through the service’s JVM configuration, such as Cassandra’s jvm-server.options. For Kafka preserve existing JVM options and use your deployment’s startup mechanism rather than server.properties.

After restarting inspect the new PID with jcmd and confirm UseBASE64Intrinsics = false when relying on the workaround. A patched runtime may retain the corrected intrinsic enabled.

I’d use this targeted workaround while arranging the patch and measure its performance impact rather than assume disabling an optimisation is free.

Rolling Out Across the Cluster

Use your maintenance runbook for the topology and check recovery before proceeding to the next process.

PlatformBefore taking a process downBefore moving to the next process
Kafka brokersCheck replication health and whether the remaining in-sync replicas satisfy the topics’ write requirementsConfirm replicas have caught up and check request errors, producer failures and consumer lag
KRaft controllersConfirm quorum health and preserve a majority throughout the restart sequenceConfirm the restarted controller has rejoined and metadata replication is healthy
Cassandra nodesCheck replica availability against the consistency levels your applications use and avoid overlapping maintenanceConfirm the node is serving normally and check read/write latency, timeouts and outstanding background work
Connect workersCheck worker capacity and the recovery behaviour of the deployed connectorsConfirm tasks resume and investigate failed tasks or growing backlog before continuing

Stop if replication or application health deteriorates and update deployment templates alongside the running processes.

Use AxonOps Cassandra monitoring or Kafka monitoring to compare metrics and logs before and after each restart. Healthy metrics help validate the rollout while the running JVM’s patch level or effective mitigation establishes remediation.

The CISA alert recommends watching for suspicious Java processes and unexpected crashes. A crash alone does not prove exploitation, but signs of compromise warrant incident response beyond patching.

I’m grateful to the researchers and maintainers working on these fixes. An accurate runtime inventory and a tested rolling-restart process will help us respond to this disclosure and the ones that follow.

Demo Sandbox

Explore AxonOps for Apache Cassandra and Kafka in a live demo environment.

Try it now
All articles