CVE-2026-35554

Apache Kafka Clients: Kafka Producer Message Corruption and Misrouting via Buffer Pool Race Condition

Published Apr 7, 2026 CVSS 3.1 · 8.7 High EPSS < 1% KEV · Not listed
Description
A race condition in the Apache Kafka Java producer client’s buffer pool management can cause messages to be silently delivered to incorrect topics.

When a produce batch expires due to delivery.timeout.ms while a network request containing that batch is still in flight, the batch’s ByteBuffer is prematurely deallocated and returned to the buffer pool. If a subsequent producer batch—potentially destined for a different topic—reuses this freed buffer before the original network request completes, the buffer contents may become corrupted. This can result in messages being delivered to unintended topics without any error being reported to the producer.


Data Confidentiality:
Messages intended for one topic may be delivered to a different topic, potentially exposing sensitive data to consumers who have access to the destination topic but not the intended source topic.

Data Integrity:
Consumers on the receiving topic may encounter unexpected or incompatible messages, leading to deserialization failures, processing errors, and corrupted downstream data.

This issue affects Apache Kafka versions ≤ 3.9.1, ≤ 4.0.1, and  ≤ 4.1.1.

Kafka users are advised to upgrade to 3.9.2, 4.0.2, 4.1.2, 4.2.0, or later to address this vulnerability.

Analysis

AI-generated

Technical impact

A race condition in the Apache Kafka Java producer client’s buffer pool causes a produced batch to expire while still travelling on the network. The batch’s ByteBuffer is released prematurely and may be reused for another batch destined for a different topic. The result is that messages are silently delivered to unintended topics, exposing data to unauthorized consumers and corrupting downstream processing. This flaw can lead to significant confidentiality and integrity risks because the producer receives no error notification.

Affected Systems

The vulnerability affects Apache Kafka clients from versions up to and including 3.9.1, 4.0.1, and 4.1.1. Users should update to version 3.9.2, 4.0.2, 4.1.2, 4.2.0, or later to remediate the flaw.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity attack with potential for major impact. The EPSS score is < 1%, indicating a very low probability of exploitation. The flaw is not listed in the CISA KEV catalog, suggesting no public exploits have been reported. The likely attack vector is through any active producer client that can send a high volume of produce requests to a Kafka cluster, attempting to trigger the race condition. Successful exploitation would not require privileged access; it merely needs network connectivity to the producer and Kafka broker, which are common in many deployments.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade all Kafka client instances to at least 3.9.2, 4.0.2, 4.1.2, or 4.2.0.
  • Ensure that all production and testing environments deploy the updated client library and redeploy producer applications.
  • Enable monitoring for unexpected message routing events and review consumer logs for deserialization errors or data anomalies.

Generated by OpenCVE AI on April 21, 2026 at 23:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-5qcv-4rpc-jp93 Apache Kafka Clients: Kafka Producer Message Corruption and Misrouting via Buffer Pool Race Condition
History
Type Values Removed Values Added
CPEs cpe:2.3:a:apache:kafka:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Apache
Apache kafka
Vendors & Products Apache
Apache kafka
Type Values Removed Values Added
Description A race condition in the Apache Kafka Java producer client’s buffer pool management can cause messages to be silently delivered to incorrect topics. When a produce batch expires due to delivery.timeout.ms while a network request containing that batch is still in flight, the batch’s ByteBuffer is prematurely deallocated and returned to the buffer pool. If a subsequent producer batch—potentially destined for a different topic—reuses this freed buffer before the original network request completes, the buffer contents may become corrupted. This can result in messages being delivered to unintended topics without any error being reported to the producer. Data Confidentiality: Messages intended for one topic may be delivered to a different topic, potentially exposing sensitive data to consumers who have access to the destination topic but not the intended source topic. Data Integrity: Consumers on the receiving topic may encounter unexpected or incompatible messages, leading to deserialization failures, processing errors, and corrupted downstream data. This issue affects Apache Kafka versions ≤ 3.9.1, ≤ 4.0.1, and  ≤ 4.1.1. Kafka users are advised to upgrade to 3.9.2, 4.0.2, 4.1.2, 4.2.0, or later to address this vulnerability.
Title Apache Kafka Clients: Kafka Producer Message Corruption and Misrouting via Buffer Pool Race Condition
Weaknesses CWE-362
CWE-416
References
Metrics cvssV3_1

{'score': 8.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

  • CWE-416

    Use After Free

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Apr 7, 2026, 4:23 PM
Reserved
Apr 3, 2026, 11:08 AM
Status
Analyzed
Published
Apr 7, 2026, 2:16 PM
Modified
Oct 26, 2026, 9:10 PM
Severity
Moderate
Public date
Apr 7, 2026, 1:07 PM