CVE-2024-56128: Kafka 2.13 Apache Kafka's SCRAM Implementation Incorrectly Vulnerability

LOW
Advisory Identifier: GHSA-p7c9-8xx8-h74f
CVSS 5.3
CWE-303
Published
Advisory Summary

CVE-2024-56128 is a LOW (CVSS 5.3) apache kafka's scram implementation incorrectly vulnerability (CWE-303: Incorrect Implementation of Authentication Algorithm) affecting Kafka 2.13 libraries in the Maven ecosystem. The issue involves apache kafka's scram implementation incorrectly implements authentication algorithm. Remediation is available by upgrading affected packages to version 3.7.2, 3.8.1.

CVE-2024-56128 at a Glance

CVE Identifier CVE-2024-56128
GHSA Identifier GHSA-p7c9-8xx8-h74f
Severity LOW
CVSS v3.1 Base Score 5.3
CWE Classification CWE-303: Incorrect Implementation of Authentication Algorithm
Affected Product Kafka 2.13
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.3

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:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-56128

To remediate this vulnerability, upgrade all affected Kafka 2.13 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_2.13 fixed: 3.7.2
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.13</artifactId>
    <version>3.7.2</version>
</dependency>
org.apache.kafka:kafka_2.13 fixed: 3.8.1
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.13</artifactId>
    <version>3.8.1</version>
</dependency>
org.apache.kafka:kafka_2.12 fixed: 3.7.2
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.12</artifactId>
    <version>3.7.2</version>
</dependency>
org.apache.kafka:kafka_2.12 fixed: 3.8.1
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.12</artifactId>
    <version>3.8.1</version>
</dependency>
org.apache.kafka:kafka_2.11 fixed: Latest secure release
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.11</artifactId>
    <version>Latest secure release</version>
</dependency>
org.apache.kafka:kafka_2.10 fixed: Latest secure release
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.10</artifactId>
    <version>Latest secure release</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-56128, 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 Kafka 2.13 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.7.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-303: Incorrect Implementation of Authentication Algorithm, where the requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect. In Kafka 2.13, 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

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.

CVE-2024-56128 Affected Kafka 2.13 Versions

6 component(s)
Fixed Versions:
3.7.23.8.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.kafka:kafka_2.13
Maven
≥ 0.10.2.0
< 3.7.2
3.7.2
org.apache.kafka:kafka_2.13
Maven
≥ 3.8.0
< 3.8.1
All 1 versions
3.8.0
3.8.1
org.apache.kafka:kafka_2.12
Maven
≥ 0.10.2.0
< 3.7.2
3.7.2
org.apache.kafka:kafka_2.12
Maven
≥ 3.8.0
< 3.8.1
All 1 versions
3.8.0
3.8.1
org.apache.kafka:kafka_2.11
Maven
≥ 0.10.2.0
≤ 2.4.1
org.apache.kafka:kafka_2.10
Maven
≥ 0.10.2.0
≤ 0.10.2.2

References

Frequently Asked Questions

What is CVE-2024-56128?
CVE-2024-56128 is a security vulnerability in Kafka 2.13 involving Apache Kafka's SCRAM implementation Incorrectly Implements Authentication Algorithm under CWE-303: Incorrect Implementation of Authentication Algorithm.
Which Kafka 2.13 versions are affected?
Affected versions include releases prior to 3.7.2, 3.8.1 across affected packages: org.apache.kafka:kafka_2.13, org.apache.kafka:kafka_2.12, org.apache.kafka:kafka_2.11, org.apache.kafka:kafka_2.10.
What version fixes CVE-2024-56128?
Upgrading to 3.7.2, 3.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kafka_2.13 affected?
Yes, org.apache.kafka:kafka_2.13 is affected in releases prior to 3.7.2, 3.8.1. Upgrade your dependency to 3.7.2, 3.8.1 or later.
Is kafka_2.12 affected?
Yes, org.apache.kafka:kafka_2.12 is affected in releases prior to 3.7.2, 3.8.1. Upgrade your dependency to 3.7.2, 3.8.1 or later.
What is the CVSS score of CVE-2024-56128?
CVE-2024-56128 has a CVSS v3.1 base score of 5.3 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-56128?
CVE-2024-56128 is classified under CWE-303: Incorrect Implementation of Authentication Algorithm (The requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect.).
How can I check Maven dependencies for CVE-2024-56128?
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-p7c9-8xx8-h74f",
  "modified" : "2025-07-02T18:53:21Z",
  "published" : "2024-12-18T15:33:00Z",
  "aliases" : [ "CVE-2024-56128" ],
  "summary" : "Apache Kafka's SCRAM implementation Incorrectly Implements Authentication Algorithm",
  "details" : "Incorrect Implementation of Authentication Algorithm in Apache Kafka's SCRAM implementation.\n\nIssue Summary:\nApache Kafka's implementation of the Salted Challenge Response Authentication Mechanism (SCRAM) did not fully adhere to the requirements of RFC 5802 [1].\nSpecifically, 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.\nHowever, Kafka's SCRAM implementation did not perform this validation.\n\nImpact:\nThis 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].\nDeployments using SCRAM with TLS are not affected by this issue.\n\nHow to Detect If You Are Impacted:\nIf your deployment uses SCRAM authentication over plaintext communication channels (without TLS encryption), you are likely impacted.\nTo 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.\n\nFix Details:\nThe issue has been addressed by introducing nonce verification in the final message of the SCRAM authentication exchange to ensure compliance with RFC 5802.\n\nAffected Versions:\nApache Kafka versions 0.10.2.0 through 3.9.0, excluding the fixed versions below.\n\nFixed Versions:\n3.9.0\n3.8.1\n3.7.2\n\nUsers are advised to upgrade to 3.7.2 or later to mitigate this issue.\n\nRecommendations for Mitigation:\nUsers unable to upgrade to the fixed versions can mitigate the issue by:\n- Using TLS with SCRAM Authentication:\nAlways deploy SCRAM over TLS to encrypt authentication exchanges and protect against interception.\n- Considering Alternative Authentication Mechanisms:\nEvaluate alternative authentication mechanisms, such as PLAIN, Kerberos or OAuth with TLS, which provide additional layers of security.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.2.0"
      }, {
        "fixed" : "3.7.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.8.0"
      }, {
        "fixed" : "3.8.1"
      } ]
    } ],
    "versions" : [ "3.8.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.2.0"
      }, {
        "fixed" : "3.7.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.8.0"
      }, {
        "fixed" : "3.8.1"
      } ]
    } ],
    "versions" : [ "3.8.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.11"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.2.0"
      }, {
        "last_affected" : "2.4.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.10"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.2.0"
      }, {
        "last_affected" : "0.10.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56128"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/kafka/commit/2cbc5bd3ca22185d9cd357c9db23a2cfb43a0fff"
  }, {
    "type" : "WEB",
    "url" : "https://datatracker.ietf.org/doc/html/rfc5802"
  }, {
    "type" : "WEB",
    "url" : "https://datatracker.ietf.org/doc/html/rfc5802#section-9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/kafka"
  }, {
    "type" : "WEB",
    "url" : "https://kafka.apache.org/documentation/#security_sasl_scram_security"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/84dh4so32lwn7wr6c5s9mwh381vx9wkw"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/12/18/3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-303" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-18T19:16:18Z",
    "nvd_published_at" : "2024-12-18T14:15:23Z"
  }
}