CVE-2026-10142: Kafka python Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-m3px-q5gj-j9x7
CVSS 7.5
CWE-789
Published
Advisory Summary

CVE-2026-10142 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Kafka python libraries in the PyPI ecosystem. The issue involves kafka-python vulnerable to denial of service through an unvalidated protocol frame length. Remediation is available by upgrading affected packages to version 2.3.2.

CVE-2026-10142 at a Glance

CVE Identifier CVE-2026-10142
GHSA Identifier GHSA-m3px-q5gj-j9x7
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product Kafka python
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-10142

To remediate this vulnerability, upgrade all affected Kafka python dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

kafka-python fixed: 2.3.2
pip install kafka-python>=2.3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show kafka-python

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-10142, inspect your installed packages using pip:

pip show kafka-python

Analyze the terminal output to locate any version of Kafka python in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.2), your application is affected.

Note: The pip show kafka-python command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Kafka python, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-10142 Affected Kafka python Versions

1 component(s)
Fixed Versions:
2.3.2
Product / Package Ecosystem Affected Versions Fixed Version
kafka-python
PyPI
< 2.3.2
2.3.2

References

Frequently Asked Questions

What is CVE-2026-10142?
CVE-2026-10142 is a security vulnerability in Kafka python involving kafka-python vulnerable to denial of service through an unvalidated protocol frame length under CWE-789: Memory Allocation with Excessive Size Value.
Which Kafka python versions are affected?
Affected versions include releases prior to 2.3.2 across affected packages: kafka-python.
What version fixes CVE-2026-10142?
Upgrading to 2.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kafka-python affected?
Yes, kafka-python is affected in releases prior to 2.3.2. Upgrade your dependency to 2.3.2 or later.
What is the CVSS score of CVE-2026-10142?
CVE-2026-10142 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-10142?
CVE-2026-10142 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check PyPI dependencies for CVE-2026-10142?
Run the dependency tree command: 'pip show kafka-python'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m3px-q5gj-j9x7",
  "modified" : "2026-09-01T17:15:36Z",
  "published" : "2026-06-11T00:32:04Z",
  "aliases" : [ "CVE-2026-10142" ],
  "summary" : "kafka-python vulnerable to denial of service through an unvalidated protocol frame length",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "kafka-python"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-10142"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/pull/3019"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/pull/3026"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/commit/6e4831444f972d169cdd11f5c8d50333cea3f19b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/commit/9f92d0f53ecfee738c54638867c3d67f83017bca"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dpkp/kafka-python"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/releases/tag/2.3.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/kafka-python/PYSEC-2026-2190.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/kafka-python-prior-to-denial-of-service-via-protocol-parser-frame-length"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-789" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-01T17:15:36Z",
    "nvd_published_at" : "2026-06-10T22:16:55Z"
  }
}