Vulnerabilities in pkg:maven/org.apache.kafka/kafka-metadata
PACKAGECVE-2024-27309 is a HIGH (CVSS 6.8) potential incorrect access control during vulnerability (CWE-863: Incorrect Authorization) affecting Apache Kafka libraries in the Maven ecosystem. The issue involves potential incorrect access control during migration from zk mode to kraft mode. Remediation is available by upgrading affected packages to version 3.6.2.
pkg:maven/org.apache.kafka/kafka-metadata
Vulnerability advisories affecting package pkg:maven/org.apache.kafka/kafka-metadata. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-79vv-vp32-gpp7 | CVE-2024-27309 | HIGH | Apache Kafka: Potential incorrect access control during migration from ZK mode to KRaft mode |
CVE-2024-27309 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2024-27309
To remediate this vulnerability, upgrade all affected Apache Kafka dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-metadata</artifactId>
<version>3.6.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.kafka
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-27309, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.kafka
Analyze the terminal output to locate any version of Apache Kafka in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.kafka command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Apache Kafka, 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-2024-27309 Affected Apache Kafka Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.kafka:kafka-metadata
|
Maven |
≥ 3.5.0
< 3.6.2
|
3.6.2
|
References
Frequently Asked Questions
What is CVE-2024-27309?
Which Apache Kafka versions are affected?
What version fixes CVE-2024-27309?
Is kafka-metadata affected?
What is the CVSS score of CVE-2024-27309?
What CWE is associated with CVE-2024-27309?
How can I check Maven dependencies for CVE-2024-27309?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-79vv-vp32-gpp7",
"modified" : "2025-02-13T19:01:30Z",
"published" : "2024-04-12T09:33:40Z",
"aliases" : [ "CVE-2024-27309" ],
"summary" : "Apache Kafka: Potential incorrect access control during migration from ZK mode to KRaft mode",
"details" : "While an Apache Kafka cluster is being migrated from ZooKeeper mode to KRaft mode, in some cases ACLs will not be correctly enforced.\n\nTwo preconditions are needed to trigger the bug:\n1. The administrator decides to remove an ACL\n2. The resource associated with the removed ACL continues to have two or more other ACLs associated with it after the removal.\n\nWhen those two preconditions are met, Kafka will treat the resource as if it had only one ACL associated with it after the removal, rather than the two or more that would be correct.\n\nThe incorrect condition is cleared by removing all brokers in ZK mode, or by adding a new ACL to the affected resource. Once the migration is completed, there is no metadata loss (the ACLs all remain).\n\nThe full impact depends on the ACLs in use. If only ALLOW ACLs were configured during the migration, the impact would be limited to availability impact. if DENY ACLs were configured, the impact could include confidentiality and integrity impact depending on the ACLs configured, as the DENY ACLs might be ignored due to this vulnerability during the migration period.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.kafka:kafka-metadata"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.5.0"
}, {
"fixed" : "3.6.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27309"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/kafka/commit/c000b1fae2bd7d4b76713a53508f128a13431ab6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/kafka"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/6536rmzyg076lzzdw2xdktvnz163mjpy"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240705-0002"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/04/12/3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-12T21:26:30Z",
"nvd_published_at" : "2024-04-12T07:15:08Z"
}
}