Apache Kafka 3.9.1 Critical Flaw: Race Condition Can Silently Send Messages to Wrong Topics
A critical race condition vulnerability in Apache Kafka's Java client library can cause messages to be silently delivered to the wrong topics, posing a severe risk to data confidentiality and system integrity. The flaw, identified as CVE-2026-35554, resides in the buffer pool management of the `org.apache.kafka:kafka-clients:jar:3.9.1`. When a produce batch expires due to the `delivery.timeout.ms` setting while its network request is still in flight, its memory buffer is prematurely deallocated and returned to the shared pool. If a subsequent producer batch—potentially destined for a completely different topic—reuses this freed buffer before the original request finishes, the buffer's contents can become corrupted. This leads to messages being delivered to unintended topics without any error being reported back to the originating producer, creating a silent failure mode.
The primary risk is a major breach of data confidentiality. Sensitive messages intended for a secure topic can be routed to a different topic where unauthorized consumers have access. This could expose private data, financial information, or internal communications. Furthermore, the flaw directly compromises data integrity. Consumers subscribed to the receiving topic will encounter unexpected, malformed, or incompatible messages, which can cause application crashes, processing errors, and corrupted data pipelines.
This vulnerability represents a fundamental failure in the client's core guarantee of reliable message delivery. It undermines trust in a system designed for high-throughput, ordered data streams. Organizations relying on Kafka 3.9.1 for critical event-driven architectures, financial transactions, or sensitive data logistics must assess their exposure immediately. The silent nature of the error means data leaks could occur without triggering any alerts, making detection and forensic analysis exceptionally difficult. Pressure is now on the Apache Kafka project to release a patch and for security teams to scrutinize their deployment configurations and monitoring for signs of this anomalous cross-topic message delivery.