Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

CVE-2026-10142 — kafka-python

Fix: dpkp/kafka-python@6e48314

CVE-2026-10142 is a CWE-789 vulnerability in kafka-python. A fix is available for kafka-python — see the affected versions and patch details below.

kafka-python prior to 2.3.2 Denial of Service via Protocol Parser Frame Length

Also known asGHSA-m3px-q5gj-j9x7PYSEC-2026-2190
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 17, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-10142.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs27th percentile — riskier than 27% of all scored CVEsHighest risk
0.00%0.28%0.57%0.85%0.3%0.3%0.3%0.3%0.3%Jul 26Sep 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐍kafka-python

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIkafka-pythonall versions2.3.2pip install --upgrade 'kafka-python==2.3.2'

Affected Products

1 product · 1 configurations
Application
kafka-pythondpkp
< 2.3.2
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for kafka-python, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update kafka-python to 2.3.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-10142 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

A flaw was found in kafka-python. The protocol parser does not validate frame length values, allowing a malicious broker or man-in-the-middle attacker to exhaust memory or hang connections by sending a crafted 4-byte frame length. This can cause multi-gigabyte memory allocation or leave connections in a broken state,…

Workaround published by Red Hat
Upgrade to kafka-python 2.3.2 or later. As a workaround, ensure Kafka broker connections use TLS with mutual authentication to prevent man-in-the-middle attacks.
Source: Red Hat security advisory for CVE-2026-10142 (CC BY 4.0)

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2026-10142 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2026-10142: kafka-python — Fixed in 2.3.2