{"id":"CVE-2026-111551","kind":"vulnerability","aliases":["CVE-2026-111551"],"related":[],"title":"Kafka: crafted size fields force huge allocations, crashing consumers with OutOfMemoryError","description":"Several Kafka deserialization paths read a size or count field from input data and use it directly to allocate an array, collection, or byte buffer, with no check against the bytes actually available. A small crafted input can therefore declare a very large size and force a multi-gigabyte allocation. The affected paths are, in Kafka Streams, ProcessorRecordContext (header count), ChangedDeserializer (varint value length), CombinedKeySchema (foreign-key length, which could also produce a negative size), ProcessorMetadata (key length), and AssignmentInfo group-assignment decoding; and, in the clients library, ListDeserializer (used by ListSerde).\n\n\nImpact:\n\nAn attacker can trigger the oversized allocation and raise an OutOfMemoryError that crashes the affected consumer or Kafka Streams thread; the broker and the rest of the cluster are unaffected. The reachable surface depends on the path: writing a crafted record to a Streams application's internal changelog or repartition topics, or committing crafted offset metadata to its consumer group (Streams internal paths); writing a crafted record to any topic that a consumer reads with ListSerde (ListDeserializer); or, as a member of a Streams consumer group, returning crafted assignment data when elected leader (AssignmentInfo). Because a crafted record remains in its topic, the error can recur on restart. The record size limit (max.message.bytes) does not help, because the allocation is driven by a size field rather than by the input's length.\n\n\nMitigation:\n\nUpgrade to Apache Kafka 4.2.2, 4.3.2, or 4.4.0. Where authorization is enabled, restrict write access to each application's internal topics and consumer group to its own principal, and restrict who can produce to topics that are consumed with ListSerde.\n\n\nResolution:\n\nFrom Apache Kafka 4.2.2, 4.3.2, and 4.4.0: these deserialization paths validate the declared size against the remaining input before allocating and reject input that fails the check.","summary":"Several Kafka Streams and clients deserializers trust a size or count field in the input and allocate memory for it without checking the bytes actually present. A crafted record or offset metadata can make a consumer or Streams thread throw OutOfMemoryError and crash.","severity":"medium","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["java","kafka","kafka-streams","package","self-hosted"],"not_affected_if":["managed-hosting","no-kafka-streams","no-listserde"],"how_to_check":"- Run `kafka-topics.sh --version` or check the Kafka version in your build file for the clients or Streams library\n- Look for Kafka Streams applications that use ListSerde, or that write to internal changelog or repartition topics that others can produce to","fix":"- Upgrade Apache Kafka Streams and clients to `4.2.2`, `4.3.2`, or `4.4.0`\n- Where authorization is enabled, restrict write access to each Streams application's internal topics and consumer group to its own principal\n- Restrict who can produce to topics consumed with ListSerde","status":"open","published_at":"2026-10-28T17:17:39+00:00","first_seen_at":"2026-10-28T17:34:08+00:00","triaged_at":"2026-10-28T17:35:06+00:00","updated_at":"2026-10-28T17:35:06+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-10-28T17:35:06Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Apache Kafka Streams and clients to `4.2.2`, `4.3.2`, or `4.4.0`\n- Where authorization is enabled, restrict write access to each Streams application's internal topics and consumer group to its own principal\n- Restrict who can produce to topics consumed with ListSerde","reach":"network","title":"Kafka: crafted size fields force huge allocations, crashing consumers with OutOfMemoryError","impact":"low","summary":"Several Kafka Streams and clients deserializers trust a size or count field in the input and allocate memory for it without checking the bytes actually present. A crafted record or offset metadata can make a consumer or Streams thread throw OutOfMemoryError and crash.","category":"package","nicknames":[],"who_cares":["kafka","kafka-streams","java","self-hosted"],"confidence":0.6,"needs_auth":"unknown","worst_case":"Consumer or Streams thread crashes with OutOfMemoryError, repeatedly on restart","analyst_note":"","how_to_check":"- Run `kafka-topics.sh --version` or check the Kafka version in your build file for the clients or Streams library\n- Look for Kafka Streams applications that use ListSerde, or that write to internal changelog or repartition topics that others can produce to","needs_analyst":false,"not_affected_if":["managed-hosting","no-kafka-streams","no-listserde"],"who_is_affected":"Teams running Kafka Streams applications or consumers that use the clients library's ListSerde or ListDeserializer. The Streams paths matter if other principals can write to the application's changelog or repartition topics or commit to its consumer group. The broker itself is not affected, so teams that only run brokers and use no Kafka client code can skip it.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000707,"input_tokens":3858,"output_tokens":643,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-111551':14A,17A '-2026':13A,16A '4.2.2':303C,343C '4.3.2':304C,344C '4.4.0':306C,346C 'access':313C 'actual':51B,101C 'affect':122C,180C 'alloc':7A,43B,88C,120C,172C,284C,359C 'also':142C 'apach':301C,341C 'applic':210C,316C 'array':90C 'assign':154C,254C 'assignmentinfo':151C,259C 'attack':167C 'author':308C 'avail':102C 'broker':187C 'buffer':94C 'byte':50B,93C,100C 'changeddeseri':131C 'changelog':213C 'check':48B,97C,366C 'client':31B,159C 'cluster':193C 'collect':91C 'combinedkeyschema':135C 'commit':218C 'consum':9A,62B,181C,224C,238C,250C,321C,336C 'could':141C 'count':37B,78C,130C 'craft':2A,54B,105C,205C,219C,231C,253C,262C 'crash':8A,69B,178C 'cve':12A,15A 'data':82C,255C 'declar':109C,352C 'decod':155C 'depend':199C 'deseri':32B,72C,348C 'direct':86C 'driven':286C 'elect':257C 'enabl':310C 'error':269C 'fail':364C 'field':4A,38B,79C,290C 'forc':5A,115C 'foreign':137C 'foreign-key':136C 'gigabyt':119C 'group':153C,225C,251C,322C 'group-assign':152C 'header':129C 'help':281C 'host':26B 'huge':6A 'impact':165C 'input':41B,81C,106C,295C,357C,362C 'intern':212C,227C,318C 'java':18B 'kafka':1A,19B,21B,28B,71C,126C,183C,302C,342C 'kafka-stream':20B 'key':138C,148C 'larg':112C 'leader':258C 'length':134C,139C,149C,297C 'librari':160C 'limit':277C 'listdeseri':161C,242C 'listserd':164C,241C,338C 'make':60B 'max.message.bytes':278C 'member':246C 'memori':44B 'metadata':58B,221C 'mitig':298C 'multi':118C 'multi-gigabyt':117C 'negat':145C 'offset':57B,220C 'outofmemoryerror':11A,67B,176C 'overs':171C 'packag':23B 'path':73C,123C,202C,228C,349C 'present':52B 'princip':326C 'processormetadata':147C 'processorrecordcontext':128C 'produc':143C,331C 'rais':174C 'rather':291C 'reachabl':197C 'read':74C,239C 'record':55B,206C,232C,263C,275C 'recur':271C 'reject':361C 'remain':264C,356C 'repartit':215C 'resolut':339C 'rest':190C 'restart':273C 'restrict':311C,328C 'return':252C 'self':25B 'self-host':24B 'sever':27B,70C 'size':3A,35B,76C,113C,146C,276C,289C,353C 'small':104C 'stream':22B,29B,64B,127C,184C,209C,226C,249C 'surfac':198C 'therefor':108C 'thread':65B,185C 'throw':66B 'topic':216C,235C,267C,319C,333C 'trigger':169C 'trust':33B 'unaffect':195C 'upgrad':299C 'use':84C,162C 'valid':350C 'valu':133C 'varint':132C 'without':47B 'write':203C,229C,312C","nicknames":[],"mitigations":[],"who_affected":"Teams running Kafka Streams applications or consumers that use the clients library's ListSerde or ListDeserializer. The Streams paths matter if other principals can write to the application's changelog or repartition topics or commit to its consumer group. The broker itself is not affected, so teams that only run brokers and use no Kafka client code can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-28T17:17:39+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-111551","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-111551","severity":null,"published_at":"2026-10-28T17:17:39+00:00","modified_at":"2026-10-28T17:17:39+00:00","first_seen_at":"2026-10-28T17:34:08+00:00","fetched_at":"2026-10-28T17:34:08+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}