Memory Allocation with Excessive Size Value Affecting kafka-python package, versions [,2.2.20)[2.3.0,2.3.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.35% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-KAFKAPYTHON-17327850
  • published12 Jun 2026
  • disclosed10 Jun 2026
  • creditKatriel Moses

Introduced: 10 Jun 2026

CVE-2026-10142  (opens in a new tab)
CWE-789  (opens in a new tab)

How to fix?

Upgrade kafka-python to version 2.2.20, 2.3.2 or higher.

Overview

kafka-python is a Pure Python client for Apache Kafka

Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value via the receive_bytes() function in the protocol parser. An attacker can exhaust system memory or cause connections to hang by sending a crafted 4-byte frame length value without bounds validation, resulting in either excessive memory allocation or an uncaught exception that disrupts normal operation.

CVSS Base Scores

version 4.0
version 3.1