Submit #1052957: Trendyol kafka-konsumer ⁠< 2.6.18⁠ Denial of Service (DoS)info

TitleTrendyol kafka-konsumer ⁠< 2.6.18⁠ Denial of Service (DoS)
DescriptionSummary When BatchConfiguration.MessageGroupByteSizeLimit is enabled, a producer able to write to the consumed Kafka topic can publish a single message larger than that limit and crash the consumer process. The message is not committed, so a managed restart can replay it and cause a crash loop. Details Details In batch_consumer.go, chunkMessagesOptimized checks whether adding a message would exceed the configured chunk byte limit. If the current chunk is empty, it calls panic instead of returning an error or handling the record. batchConsumer.consume calls this function while flushing batches, before dispatching messages to the application callback and before committing their offsets. A single oversized record can therefore terminate the whole Go process. Because the offset is not committed before the panic, restarting the consumer can replay the same record and crash again. This affects batch consumers configured with a positive MessageGroupByteSizeLimit; the record must also be within the Kafka broker and reader size limits. Relevant source: batch_consumer.go:204–225 and batch_consumer.go:245–264. Proof of concept Create a Kafka topic named input on a broker at localhost:9092. Start a consumer configured as follows: consumer, err := konsumer.NewConsumer(&konsumer.ConsumerConfig{ Reader: konsumer.ReaderConfig{ Brokers: []string{"localhost:9092"}, Topic: "input", GroupID: "crash-repro", MaxBytes: 2 << 20, }, Concurrency: 1, BatchConfiguration: &konsumer.BatchConfiguration{ MessageGroupLimit: 1, MessageGroupByteSizeLimit: 1024, BatchConsumeFn: func([]*konsumer.Message) error { return nil }, }, }) if err != nil { log.Fatal(err) } consumer.Consume() select {} Using github.com/segmentio/kafka-go, publish a message whose value is larger than 1,024 bytes: writer := &kafkaio.Writer{ Addr: kafkaio.TCP("localhost:9092"), Topic: "input", } defer writer.Close() err := writer.WriteMessages( context.Background(), kafkaio.Message{Value: bytes.Repeat([]byte("A"), 1025)}, ) if err != nil { log.Fatal(err) } Expected result: the consumer process terminates with a panic containing invalid chunk byte size; BatchConsumeFn is not reached. Impact Denial of service against applications using this library in batch mode with a byte-size limit. An attacker needs permission to publish to the consumer’s Kafka topic. A poison record can keep the service in a crash loop if a supervisor restarts it. No confidentiality or integrity impact is expected.
Source⚠️ https://github.com/Trendyol/kafka-konsumer/security/advisories/GHSA-jjgw-p88q-qrxr
User
 efek (UID 102374)
Submission10/23/2026 04:39 (26 days ago)
Moderation11/18/2026 08:08 (26 days later)
StatusDuplicate
VulDB entry432884 [Trendyol kafka-konsumer up to 2.6.17 Batch Consumer batch_consumer.go denial of service]
Points0

Do you know our Splunk app?

Download it now for free!