Skip to content

Apache Kafka: Potential incorrect access control during migration from ZK mode to KRaft mode

Moderate severity GitHub Reviewed Published Apr 12, 2024 to the GitHub Advisory Database • Updated May 2, 2024

Package

maven org.apache.kafka:kafka-metadata (Maven)

Affected versions

>= 3.5.0, < 3.6.2

Patched versions

3.6.2

Description

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.

References

Published by the National Vulnerability Database Apr 12, 2024
Published to the GitHub Advisory Database Apr 12, 2024
Reviewed Apr 12, 2024
Last updated May 2, 2024

Severity

Moderate
6.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Weaknesses

CVE ID

CVE-2024-27309

GHSA ID

GHSA-79vv-vp32-gpp7

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.