CVE-2026-10142: Kafka python Denial of Service Vulnerability
HIGHCVE-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
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).
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.
pip install kafka-python>=2.3.2
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
CVE-2026-10142 Affected Kafka python Versions
1 component(s)| 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?
Which Kafka python versions are affected?
What version fixes CVE-2026-10142?
Is kafka-python affected?
What is the CVSS score of CVE-2026-10142?
What CWE is associated with CVE-2026-10142?
How can I check PyPI dependencies for CVE-2026-10142?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}