CVE-2026-111496
Apache Kafka: Kafka Streams StreamThread hang from integer overflow in stream-time punctuation
Description
Kafka Streams derives its stream-time clock from record timestamps. PunctuationSchedule.next() computed the next punctuation time as timestamp + (intervalsMissed + 1) * interval with no overflow check. A record with a timestamp at or near Long.MAX_VALUE advances stream time to that value, so the next stream-time punctuation overflows to a negative time. PunctuationQueue then re-queues that time and loops on it indefinitely while holding a lock, stalling the StreamThread.
Impact:
A single record is enough. The affected StreamThread stops processing, and because the record stays in the topic the hang returns on restart; an application whose partitions are all affected becomes unresponsive. Only the Streams application is affected, not the brokers or the cluster. Triggering it needs write access to a source topic whose topology uses stream-time punctuation, and a broker that stores the record: brokers from Apache Kafka 4.0.0 reject such a timestamp by default (log.message.timestamp.after.max.ms, one hour), so it is reachable only on older brokers or where that bound has been relaxed.
Mitigation:
Upgrade Kafka Streams to 4.2.2, 4.3.2, or 4.4.0. As defense in depth, keep log.message.timestamp.after.max.ms bounded on source topics and restrict write access to them.
Resolution:
From Apache Kafka 4.2.2, 4.3.2, and 4.4.0: the next punctuation time is computed with overflow-checked arithmetic (clamped to Long.MAX_VALUE), and a rescheduled punctuation is re-queued only when its time moves forward.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.apache.kafka » kafka-streamspreliminary | >= 1.1.0, <= 4.1.2>= 4.2.0, <= 4.2.1>= 4.3.0, <= 4.3.1 | - |
Blast radius
71% of the dependent artifacts (513) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 10,784 |
| 2 hops | 6,457 |
| 3 hops | 5,596 |
| 4 hops | 2,830 |
| 5 hops | 977 |
| 6 hops | 273 |
Most used dependents
- org.springframework.kafka » spring-kafka-test289 usages
- org.apache.kafka » kafka-streams-test-utils113 usages
- io.github.embeddedkafka » embedded-kafka74 usages
- software.amazon.kinesis » amazon-kinesis-client68 usages
- com.amazonaws » amazon-kinesis-producer53 usages
- org.eclipse.dirigible » dirigible-api49 usages
- io.github.microsphere-projects » microsphere-spring-test41 usages
- ch.admin.bit.jeap » jeap-messaging-infrastructure-kafka-test27 usages
- com.rarible.core » rarible-core-test-common25 usages
- org.apache.kafka » kafka-streams-scala22 usages
- software.amazon.glue » schema-registry-serde20 usages
- org.eclipse.dirigible » dirigible-ext17 usages
- org.springframework.cloud » spring-cloud-stream-binder-kafka-streams15 usages
- org.locationtech.geomesa » geomesa-kafka-datastore15 usages
- fundingcircle » jackdaw14 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
