Vulnerabilities in pkg:pypi/kafka-python

PACKAGE
Advisory Identifier: GHSA-2jcm-hq8r-84wx
Advisory Summary

CVE-2026-10143 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-606: Unchecked Input for Loop Condition) affecting Kafka python libraries in the PyPI ecosystem. The issue involves kafka-python vulnerable to denial of service through an unbounded scram iteration count. Remediation is available by upgrading affected packages to version 2.3.2.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/kafka-python

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/kafka-python. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-2jcm-hq8r-84wx CVE-2026-10143 HIGH kafka-python vulnerable to denial of service through an unbounded SCRAM iteration count
GHSA-m3px-q5gj-j9x7 CVE-2026-10142 HIGH kafka-python vulnerable to denial of service through an unvalidated protocol frame length

CVE-2026-10143 at a Glance

CVE Identifier CVE-2026-10143
GHSA Identifier GHSA-2jcm-hq8r-84wx
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-606: Unchecked Input for Loop Condition
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-10143

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-10143, 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-606: Unchecked Input for Loop Condition, where the product does not properly check inputs that are used for loop conditions, potentially leading to a denial of service or other consequences because of excessive looping. 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 SCRAM authentication handling that allows a malicious or machine-in-the-middle broker to freeze the client event loop by supplying an excessively large iteration count. In scram.py, ScramClient.process_server_first_message() passes the broker-controlled SCRAM iteration count directly to hashlib.pbkdf2_hmac() without validation, blocking producer sends, consumer polls, admin operations, and heartbeats, which can cause consumer group eviction and repeated reconnect failures.

CVE-2026-10143 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

NVD — CVE-2026-10143 NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-10143
Kafka python Source Repository REPOSITORY
https://github.com/dpkp/kafka-python/pull/3026
Kafka python Source Repository REPOSITORY
https://github.com/dpkp/kafka-python/pull/3019
Security Fix Commit FIX COMMIT
https://github.com/dpkp/kafka-python/commit/74400d7ef1b54ad24d4b8170c23b58d1cab65e4f
Security Fix Commit FIX COMMIT
https://github.com/dpkp/kafka-python/commit/6e4831444f972d169cdd11f5c8d50333cea3f19b
www.vulncheck.com/advisories/kafka-py... WEB
https://www.vulncheck.com/advisories/kafka-python-prior-to-dos-via-scram-iteration-count-in-scram-py
Kafka python Security Information SECURITY
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-10143.json
Kafka python Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/kafka-python/PYSEC-2026-2191.yaml
Kafka python Release RELEASE
https://github.com/dpkp/kafka-python/releases/tag/2.3.2
Kafka python Source Repository REPOSITORY
https://github.com/dpkp/kafka-python
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2487722
Kafka python Security Information SECURITY
https://access.redhat.com/security/cve/CVE-2026-10143
access.redhat.com/errata/rhsa-2026:42... WEB
https://access.redhat.com/errata/RHSA-2026:42796
access.redhat.com/errata/rhsa-2026:41... WEB
https://access.redhat.com/errata/RHSA-2026:41066
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33683
access.redhat.com/errata/rhsa-2026:30... WEB
https://access.redhat.com/errata/RHSA-2026:30076
access.redhat.com/errata/rhsa-2026:28... WEB
https://access.redhat.com/errata/RHSA-2026:28571

Frequently Asked Questions

What is CVE-2026-10143?
CVE-2026-10143 is a security vulnerability in Kafka python involving kafka-python vulnerable to denial of service through an unbounded SCRAM iteration count under CWE-606: Unchecked Input for Loop Condition.
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-10143?
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-10143?
CVE-2026-10143 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-10143?
CVE-2026-10143 is classified under CWE-606: Unchecked Input for Loop Condition (The product does not properly check inputs that are used for loop conditions, potentially leading to a denial of service or other consequences because of excessive looping.).
How can I check PyPI dependencies for CVE-2026-10143?
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-2jcm-hq8r-84wx",
  "modified" : "2026-09-01T17:16:18Z",
  "published" : "2026-06-11T00:32:04Z",
  "aliases" : [ "CVE-2026-10143" ],
  "summary" : "kafka-python vulnerable to denial of service through an unbounded SCRAM iteration count",
  "details" : "kafka-python prior to 2.3.2 contains a denial-of-service vulnerability in SCRAM authentication handling that allows a malicious or machine-in-the-middle broker to freeze the client event loop by supplying an excessively large iteration count. In scram.py, ScramClient.process_server_first_message() passes the broker-controlled SCRAM iteration count directly to hashlib.pbkdf2_hmac() without validation, blocking producer sends, consumer polls, admin operations, and heartbeats, which can cause consumer group eviction and repeated reconnect failures.",
  "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-10143"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/pull/3026"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/pull/3019"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/commit/74400d7ef1b54ad24d4b8170c23b58d1cab65e4f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/commit/6e4831444f972d169cdd11f5c8d50333cea3f19b"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/kafka-python-prior-to-dos-via-scram-iteration-count-in-scram-py"
  }, {
    "type" : "WEB",
    "url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-10143.json"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/kafka-python/PYSEC-2026-2191.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dpkp/kafka-python/releases/tag/2.3.2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dpkp/kafka-python"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2487722"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2026-10143"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:42796"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:41066"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33683"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:30076"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:28571"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-606" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-01T17:16:18Z",
    "nvd_published_at" : "2026-06-10T22:16:55Z"
  }
}