Vulnerabilities in pkg:maven/org.apache.kafka/kafka-metadata

PACKAGE
Advisory Identifier: GHSA-79vv-vp32-gpp7
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.kafka/kafka-metadata

1 Known Advisory Record(s)

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

CVE Identifier CVE-2024-27309
GHSA Identifier GHSA-79vv-vp32-gpp7
Severity HIGH
CVSS v3.1 Base Score 6.8
CWE Classification CWE-863: Incorrect Authorization
Affected Product Apache Kafka
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

org.apache.kafka:kafka-metadata fixed: 3.6.2
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka-metadata</artifactId>
    <version>3.6.2</version>
</dependency>
Verify Direct and Transitive Dependencies

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

While an Apache Kafka cluster is being migrated from ZooKeeper mode to KRaft mode, in some cases ACLs will not be correctly enforced. Two preconditions are needed to trigger the bug: 1. The administrator decides to remove an ACL 2. The resource associated with the removed ACL continues to have two or more other ACLs associated with it after the removal. When 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. The 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). The 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.

CVE-2024-27309 Affected Apache Kafka Versions

1 component(s)
Fixed Versions:
3.6.2
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?
CVE-2024-27309 is a security vulnerability in Apache Kafka involving Potential incorrect access control during migration from ZK mode to KRaft mode under CWE-863: Incorrect Authorization.
Which Apache Kafka versions are affected?
Affected versions include releases prior to 3.6.2 across affected packages: org.apache.kafka:kafka-metadata.
What version fixes CVE-2024-27309?
Upgrading to 3.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kafka-metadata affected?
Yes, org.apache.kafka:kafka-metadata is affected in releases prior to 3.6.2. Upgrade your dependency to 3.6.2 or later.
What is the CVSS score of CVE-2024-27309?
CVE-2024-27309 has a CVSS v3.1 base score of 6.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-27309?
CVE-2024-27309 is classified under CWE-863: Incorrect Authorization (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.).
How can I check Maven dependencies for CVE-2024-27309?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.kafka'. 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-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"
  }
}