CVE-2026-111108 in Kafkainfo

Summary

by MITRE • 10/28/2026

Apache Kafka's code-generated protocol readers pre-size an array's collection from the element count declared by the sender. That count is checked only against the bytes remaining in the request buffer, which assumes about one byte per element; because most elements need several bytes, a request can declare far more elements than the buffer holds and still pass. For a keyed array the reader then allocates an ImplicitLinkedHashCollection of capacity (2 * count +1), so a request of a few tens of megabytes can force a heap allocation several times larger before any element is read. The pattern is emitted into every generated reader, so it affects all Kafka API types with an array field. 


Impact:

Request parsing happens before any authorization check. On a listener that does not require authentication (for example PLAINTEXT), an unauthenticated attacker can send a few concurrent requests that each declare a very large=

array length and allocate many times their wire size in broker heap, crashing the broker with an OutOfMemoryError. The reporter demonstrated three concurrent ~90 MB ProduceRequest (v3) connections exhausting a 1 GB heap (~8x amplification). On listeners that require authentication, the attacker needs valid credentials but no specific ACL, since parsing precedes authorization..


Mitigation:

Upgrade to Apache Kafka 4.2.2, 4.3.2, or 4.4.0. Until then, lowering socket.request.max.bytes and restricting network access to broker listeners reduces, but does not remove, exposure.


Resolution:

From Apache Kafka 4.2.2, 4.3.2, and 4.4.0: generated readers cap the initial array pre-allocation at MessageUtil.MAX_PREALLOCATED_ARRAY_CAPACITY (1000) and grow it on demand, and reject a declared array length above MessageUtil.MAX_ARRAY_LENGTH (1,000,000).

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 10/28/2026

The vulnerability in Apache Kafka stems from a critical flaw in the code-generated protocol readers responsible for deserializing incoming network requests. These readers pre-allocate memory for collection arrays based on an element count declared by the sender within the request payload. The security failure lies in the validation logic used to verify this count; it checks the declared number of elements only against the remaining bytes in the request buffer, operating under the flawed assumption that each element occupies approximately one byte. In reality, most Kafka message types require several bytes per element due to metadata and data overhead. This discrepancy allows an attacker to craft a malicious request with a significantly inflated array length declaration that technically fits within the declared byte limit of the network packet but vastly exceeds the actual memory required if processed correctly.

This logic error leads directly to excessive heap allocation, creating a severe resource exhaustion risk. For keyed arrays specifically, the Kafka reader allocates an ImplicitLinkedHashCollection with a capacity calculated as two times the declared count plus one. Consequently, a request that appears modest in network size can trigger the broker to allocate several times its wire size in Java heap memory before any actual element data is read or processed. Because this pattern exists in every generated protocol reader, it affects all Kafka API types containing array fields, making the vulnerability pervasive across various message operations such as ProduceRequest, FetchRequest, and others. The amplification factor can be substantial; demonstrations have shown that concurrent requests of approximately ninety megabytes each can exhaust a one-gigabyte heap through an eight-fold memory amplification effect.

The operational impact is particularly severe because request parsing occurs before any authorization or authentication checks are performed on the listener. For listeners configured with PLAINTEXT security protocol, which do not require client authentication, an unauthenticated attacker can exploit this flaw remotely by sending a few concurrent requests that declare extremely large array lengths. This action forces the broker to allocate massive amounts of memory rapidly, leading to an OutOfMemoryError and causing the Kafka broker process to crash or become unavailable. Even on listeners requiring authentication, the vulnerability remains exploitable because the parsing phase precedes authorization checks; thus, any user with valid credentials but lacking specific Access Control List permissions can still trigger the heap exhaustion by sending malformed requests during the initial deserialization stage.

From a classification perspective, this flaw aligns with CWE-400: Uncontrolled Resource Consumption and CWE-789: Memory Allocation with Excessive Size Value. The attack vector corresponds to ATT&CK technique T1496: Resource Hijacking, specifically where an attacker consumes system resources like memory or CPU to degrade service availability rather than stealing data. This is a classic example of how improper input validation during deserialization can lead to denial-of-service conditions in distributed messaging systems that rely on binary protocols for performance.

To mitigate this vulnerability, organizations must upgrade Apache Kafka to version 4.2.2, 4.3.2, or 4.4.0 and later. These patched versions address the root cause by capping the initial array pre-allocation at MessageUtil.MAX_PREALLOCATED_ARRAY_CAPACITY, which is set to one thousand elements. The implementation also ensures that arrays grow on demand rather than being over-allocated upfront, and it rejects any declared array length exceeding MessageUtil.MAX_ARRAY_LENGTH of one million elements. Until an upgrade can be performed, administrators should lower the socket.request.max.bytes configuration parameter to limit the maximum size of incoming requests and restrict network access to broker listeners using firewalls or security groups to reduce exposure to untrusted networks.

Responsible

Apache

Reservation

10/15/2026

Disclosure

10/28/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!