CVE-2026-114349
Unbounded Memory Allocation in Compressed Record Decoding
01Record
| Identifier | CVE-2026-114349 |
|---|---|
| Project | Apache Kafka |
| Component | org.apache.kafka.common.record.internal.DefaultRecord |
| CWE | CWE-789 |
| CVSS | 6.5 |
| Disclosed | 2026-10-28 |
| Endor reference | ENDOR-VUL-2026-15051 |
| Writeup | Link |
02Detail
Description: When a broker decodes a compressed record batch, the per-record decoder in DefaultRecord reads a declared body size from the decompressed stream and allocates a buffer of that size before validating it against the bytes actually available or any configured limit. The size is attacker-controlled and the batch CRC does not constrain it, so a CRC-valid compressed produce request of roughly 90 bytes can declare a body of about 2 GiB and drive the decoder to an OutOfMemoryError.
Because the crafted batch passes CRC validation, it is stored and replicated, so the failure recurs on every later read, and the log cleaner hitting it can halt compaction broker-wide. The flawed path is reached by brokers, by consumers, and by consumer-based tooling such as kafka-console-consumer.sh and kafka-dump-log.sh.
Impact: Denial of service through memory exhaustion, reachable by a low-privileged producer and persistent once the batch is stored.
Affects Apache Kafka; fixed in 4.2.2, 4.3.2, and 4.4.0. Found by pointing Endor Labs AI SAST at Kafka, which traced the attacker-controlled size value from the decompressed stream to the unchecked allocation. Also tracked as CWE-400, CWE-770, and CWE-1284.
Discovered by Peyton Kennedy (p80n).