Cloudanix VulnDB

CVE-2024-56128

Medium · 5.3

Apache Kafka's SCRAM implementation Incorrectly Implements Authentication Algorithm

CVSS

5.3

EPSS

0.8%

Published

Dec 18, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

Kafka clusters that allow login credentials to travel over unencrypted connections can be tricked into accepting fake login attempts if someone is watching the network traffic.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Theoretical
Impact
Other
Component
Application
Class
Authentication Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Apache Kafka's SCRAM implementation omits server-side nonce verification in the final authentication message as required by RFC 5802, allowing an intercepted plaintext exchange to complete without matching the server-issued nonce.

Why it matters to the business

Organizations using SCRAM authentication without TLS encryption face potential unauthorized access to Kafka clusters, which can lead to data exposure, message tampering, or cluster disruption; the low EPSS and absence from KEV indicate limited observed exploitation but require prompt attention for any plaintext deployments.

How an attack unfolds

An attacker positioned to observe unencrypted network traffic captures a SCRAM authentication exchange, crafts a client response that omits or mismatches the expected nonce, and completes authentication as a legitimate user without possessing valid credentials.

How to fix it

Upgrade Apache Kafka to version 3.7.2, 3.8.1, or 3.9.0; if upgrade is delayed, enforce TLS on all listeners and replace SASL_PLAINTEXT with SASL_SSL, or migrate to alternative mechanisms such as Kerberos or OAuth with TLS.

How to confirm the fix worked

Review server.properties for any SASL_PLAINTEXT listener entries; after upgrade confirm the presence of nonce verification logic in the SCRAM exchange and test authentication over both plaintext and TLS paths.

Typical attack path

  1. Locate Kafka listeners configured with SASL_PLAINTEXT and SCRAM
  2. Intercept the initial server nonce and subsequent client messages
  3. Submit a manipulated final client message that bypasses nonce matching
  4. Obtain an authenticated session to the broker

How to detect it

Search broker and client logs for SASL_PLAINTEXT listener configurations and any authentication events occurring on non-TLS ports; review network captures for SCRAM exchanges lacking TLS protection.

  • SASL_PLAINTEXT
  • listeners=.*SASL_PLAINTEXT

What your security team should do

  • Immediately audit all Kafka clusters for SASL_PLAINTEXT usage and migrate to TLS-protected listeners
  • Schedule upgrades to 3.7.2 or newer within the next maintenance window
  • Add configuration scanning to CI/CD pipelines to block future plaintext SASL deployments

The record

Incorrect Implementation of Authentication Algorithm in Apache Kafka's SCRAM implementation. Issue Summary: Apache Kafka's implementation of the Salted Challenge Response Authentication Mechanism (SCRAM) did not fully adhere to the requirements of RFC 5802 [1]. Specifically, as per RFC 5802, the server must verify that the nonce sent by the client in the second message matches the nonce sent by the server in its first message. However, Kafka's SCRAM implementation did not perform this validation. Impact: This vulnerability is exploitable only when an attacker has plaintext access to the SCRAM authentication exchange. However, the usage of SCRAM over plaintext is strongly discouraged as it is considered an insecure practice [2]. Apache Kafka recommends deploying SCRAM exclusively with TLS encryption to protect SCRAM exchanges from interception [3]. Deployments using SCRAM with TLS are not affected by this issue. How to Detect If You Are Impacted: If your deployment uses SCRAM authentication over plaintext communication channels (without TLS encryption), you are likely impacted. To check if TLS is enabled, review your server.properties configuration file for listeners property. If you have SASL_PLAINTEXT in the listeners, then you are likely impacted. Fix Details: The issue has been addressed by introducing nonce verification in the final message of the SCRAM authentication exchange to ensure compliance with RFC 5802. Affected Versions: Apache Kafka versions 0.10.2.0 through 3.9.0, excluding the fixed versions below. Fixed Versions: 3.9.0 3.8.1 3.7.2 Users are advised to upgrade to 3.7.2 or later to mitigate this issue. Recommendations for Mitigation: Users unable to upgrade to the fixed versions can mitigate the issue by: - Using TLS with SCRAM Authentication: Always deploy SCRAM over TLS to encrypt authentication exchanges and protect against interception. - Considering Alternative Authentication Mechanisms: Evaluate alternative authentication mechanisms, such as PLAIN, Kerberos or OAuth with TLS, which provide additional layers of security.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.apache.kafka:kafka 0.10.2.0 3.7.2
Maven org.apache.kafka:kafka 3.8.0 3.8.1
Maven org.apache.kafka:kafka_2.10 0.10.2.0 No fix
Maven org.apache.kafka:kafka_2.11 0.10.2.0 No fix
Maven org.apache.kafka:kafka_2.12 0.10.2.0 3.7.2
Maven org.apache.kafka:kafka_2.12 3.8.0 3.8.1
Maven org.apache.kafka:kafka_2.13 0.10.2.0 3.7.2
Maven org.apache.kafka:kafka_2.13 3.8.0 3.8.1
Bitnami kafka 3.8.0 3.8.1
Chainguard kafka-strimzi-compat 0 0.46.1-r0
Chainguard kafka_exporter-strimzi-compat 0 0.46.1-r0
Chainguard prometheus-jmx-exporter-strimzi-compat 0 0.46.1-r0
Chainguard strimzi-kafka-operator 0 0.46.1-r0
Chainguard strimzi-kafka-operator-cluster-operator 0 0.46.1-r0
Chainguard strimzi-kafka-operator-kafka-agent 0 0.46.1-r0
Chainguard strimzi-kafka-operator-kafka-agent-3 0 0.46.1-r0
Chainguard strimzi-kafka-operator-kafka-base 0 0.46.1-r0
Chainguard strimzi-kafka-operator-kafka-init 0 0.46.1-r0
Chainguard strimzi-kafka-operator-kafka-thirdparty-libs 0 0.46.1-r0
Chainguard strimzi-kafka-operator-kafka-thirdparty-libs-cc 0 0.46.1-r0
Chainguard strimzi-kafka-operator-mirror-maker-agent 0 0.46.1-r0
Chainguard strimzi-kafka-operator-topic-operator 0 0.46.1-r0
Chainguard strimzi-kafka-operator-tracing-agent 0 0.46.1-r0
Chainguard strimzi-kafka-operator-user-operator 0 0.46.1-r0
Wolfi kafka-strimzi-compat 0 0.46.1-r0
Wolfi kafka_exporter-strimzi-compat 0 0.46.1-r0
Wolfi prometheus-jmx-exporter-strimzi-compat 0 0.46.1-r0
Wolfi strimzi-kafka-operator 0 0.46.1-r0
Wolfi strimzi-kafka-operator-cluster-operator 0 0.46.1-r0
Wolfi strimzi-kafka-operator-kafka-agent 0 0.46.1-r0
Wolfi strimzi-kafka-operator-kafka-agent-3 0 0.46.1-r0
Wolfi strimzi-kafka-operator-kafka-base 0 0.46.1-r0
Wolfi strimzi-kafka-operator-kafka-init 0 0.46.1-r0
Wolfi strimzi-kafka-operator-kafka-thirdparty-libs 0 0.46.1-r0
Wolfi strimzi-kafka-operator-kafka-thirdparty-libs-cc 0 0.46.1-r0
Wolfi strimzi-kafka-operator-mirror-maker-agent 0 0.46.1-r0
Wolfi strimzi-kafka-operator-topic-operator 0 0.46.1-r0
Wolfi strimzi-kafka-operator-tracing-agent 0 0.46.1-r0
Wolfi strimzi-kafka-operator-user-operator 0 0.46.1-r0
maven org.apache.kafka/kafka 0.10.2.0 3.7.2
maven org.apache.kafka/kafka 3.8.0 No fix
maven org.apache.kafka/kafka 3.8.0 3.8.1
maven org.apache.kafka/kafka_2.10 0.10.2.0 No fix
maven org.apache.kafka/kafka_2.11 0.10.2.0 No fix
maven org.apache.kafka/kafka_2.12 0.10.2.0 3.7.2
maven org.apache.kafka/kafka_2.12 3.8.0 No fix
maven org.apache.kafka/kafka_2.12 3.8.0 3.8.1
maven org.apache.kafka/kafka_2.13 0.10.2.0 3.7.2
maven org.apache.kafka/kafka_2.13 3.8.0 No fix
maven org.apache.kafka/kafka_2.13 3.8.0 3.8.1

Related vulnerabilities