Skip to main content

kafka-python EUVDEUVD-2026-36123

| CVE-2026-10142 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-06-10 VulnCheck GHSA-m3px-q5gj-j9x7
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Position as malicious or impersonated broker
  2. Delivery
    Victim client opens Kafka connection
  3. Exploit
    Send response frame with oversized 4-byte length prefix
  4. Execution
    receive_bytes() skips bounds check
  5. Persist
    Multi-GB allocation or uncaught ValueError
  6. Impact
    Consumer process OOM or heartbeat stalls

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

Attacker must be able to deliver bytes to the kafka-python client's TCP socket as if they were a Kafka broker response - either by operating a broker the victim bootstraps against, compromising a legitimate broker, or sitting on the network path of a non-TLS Kafka connection. No victim-side authentication, user interaction, or configuration changes are required; the vulnerable receive_bytes() path runs on every connection by default in all of KafkaConsumer, KafkaProducer, and KafkaAdminClient. Limiting factors: the attacker needs broker-position or MITM-position (not arbitrary internet reach), and impact is confined to availability of the kafka-python process - no code execution or data disclosure.

Impact

CVSS 4.0 8.7 is driven entirely by VA:H with VC:N/VI:N - this is a pure availability bug, not RCE or data exposure. AV:N/AC:L/AT:N/PR:N/UI:N is technically correct but materially misleading: exploitation requires the attacker to control or impersonate a Kafka broker the victim client connects to, which is not the same threat surface as a generic internet-exposed service. Realistic threat actors are malicious or compromised brokers in shared/multi-tenant Kafka deployments, or network-position attackers on unencrypted (non-TLS) Kafka traffic. No CISA KEV listing, no EPSS score provided, no public exploit identified at time of analysis. Priority should be moderate-to-high for shops running kafka-python consumers against untrusted or cross-tenant brokers (e.g., SaaS data pipelines), and lower for fully internal deployments with TLS and trusted broker fleets.

Exploit ScenarioDerived

An attacker who controls a Kafka broker the victim client connects to (e.g., a malicious tenant in a shared cluster, a rogue insider, or a network attacker on plaintext Kafka traffic) sends a response frame whose 4-byte length prefix declares ~2 GB. The kafka-python parser attempts to allocate that buffer, exhausting victim process memory and triggering OOM-kill, or alternatively raises an uncaught ValueError that leaves the consumer's connection state broken and stops group heartbeats until the process is restarted. No public exploit identified at time of analysis, but the trigger is a one-packet condition trivially reproducible from any custom Kafka server stub.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 10, 2026

Denial of service in the kafka-python client library (versions prior to 2.3.2) allows a malicious Kafka broker or man-in-the-middle attacker to exhaust client memory or wedge connections by sending a crafted 4-byte frame length header. The protocol parser's receive_bytes() function performs no bounds check on the declared frame size, leading to multi-gigabyte allocations or uncaught ValueError exceptions that stop consumer heartbeats. No public exploit identified at time of analysis; reported by VulnCheck with an upstream patch already merged.

Earlier versions of this analysis (2)
v2 Jun 10, 2026 - 22:32 cvss changed CVSS 8.7

Denial of service in kafka-python prior to 2.3.2 allows a malicious broker or man-in-the-middle attacker to exhaust client memory or hang consumer connections by sending an unvalidated 4-byte frame length value to the protocol parser. The receive_bytes() function in kafka/protocol/parser.py accepted attacker-controlled frame sizes without bounds checking, enabling multi-gigabyte allocations or uncaught ValueErrors that leave consumers unable to heartbeat until restart. No public exploit identified at time of analysis, but the upstream fix is confirmed via merged GitHub PRs #3019 and #3026.

v1 Jun 10, 2026 - 21:17 CVSS 7.5

Denial of service in kafka-python before 2.3.2 lets a malicious Kafka broker or machine-in-the-middle attacker hang client connections and exhaust memory by sending a crafted 4-byte frame length, causing consumers to stop heartbeating and producers to stall until restart. The flaw sits in the protocol parser's receive_bytes() path, which accepts attacker-controlled frame sizes without bounds checking, and no public exploit identified at time of analysis though the upstream fix is available.

RemediationAI

Vendor-released patch: upgrade kafka-python to 2.3.2 or later, which adds bounds checking in KafkaProtocol.receive_bytes() via _validate_frame_size() and exposes a configurable receive_message_max_bytes ceiling (default 1 MB at the connection layer). The fix commit is https://github.com/dpkp/kafka-python/commit/6e4831444f972d169cdd11f5c8d50333cea3f19b. If immediate upgrade is not possible, compensating controls are limited because the parser code path is reached on every inbound frame: enforce TLS with broker certificate verification on all client connections to remove the man-in-the-middle vector (trade-off: requires PKI setup and slight CPU overhead), restrict clients to connect only to brokers in trusted network segments via egress firewalling (trade-off: breaks multi-region/SaaS Kafka topologies), and add process-level memory limits (cgroups, ulimit -v, Kubernetes resource limits) so that a runaway allocation kills and restarts the consumer rather than starving the host (trade-off: still causes a DoS, just a contained one). Once on 2.3.2, consider lowering receive_message_max_bytes below the 1 MB default if your workload's legitimate message sizes are smaller.

Affected VersionsENISA

kafka-python 0 <2.3.2

Affected Packages

pypi kafka-python fix: 2.3.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

kafka-python is the pure-Python client library for Apache Kafka maintained by Dana Powers (dpkp/kafka-python). The root cause is CWE-789 (Memory Allocation with Excessive Size Value): KafkaProtocol.receive_bytes() in kafka/protocol/parser.py reads the first 4 bytes of each wire frame as a big-endian length prefix and then attempts to buffer that many bytes without validating the value against any ceiling. A hostile peer can therefore declare any value up to 2^31 bytes (~2 GB), triggering either a runaway allocation or, when the negative/oversized path is hit, a bare ValueError that the connection state machine does not recover from - leaving in-flight requests dangling and consumer group heartbeats blocked. The fix introduces an InvalidReceiveError class and a _validate_frame_size() helper gated by a new receive_message_max_bytes configuration knob (default 1 MB at the connection layer, 100 MB at the parser).

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Triggered by a single unauthenticated network frame from a broker-positioned attacker; pure availability impact (OOM or hung connection), no confidentiality or integrity loss, no scope change.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 5.9 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Jun 10, 2026 - 22:33 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 10, 2026 - 22:32 vuln.today
v2 - CVSS changed
CVSS changed
Jun 10, 2026 - 22:22 NVD
7.5 (HIGH) 8.7 (HIGH)

DescriptionCVE.org

kafka-python prior to 2.3.2 contains a denial-of-service vulnerability in the protocol parser that allows a malicious broker or machine-in-the-middle attacker to exhaust memory or hang connections by sending a crafted 4-byte frame length value without bounds validation. Attackers can send a specially crafted frame length through the receive_bytes() function to trigger either a multi-gigabyte memory allocation or an uncaught ValueError that leaves the connection in a broken state, causing requests to hang and consumers to stop heartbeating until restart.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on kafka-python (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 2.3.2.

Executive ViewAI

Why It Matters

The kafka-python client library vulnerability (CVE-2026-10142, CVSS 8.7) enables denial-of-service attacks against organizations running Kafka-based data pipelines, allowing network-adjacent attackers to crash consumer applications through memory exhaustion. Organizations using kafka-python for event streaming, real-time analytics, or message consumption face potential service disruptions that could cascade to dependent systems and delay critical data processing. Upgrading to version 2.3.2 or later is required to eliminate this availability risk.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: Important
Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy