Vulnerabilities in pkg:maven/org.apache.kafka/kafka_2.11

PACKAGE
Advisory Identifier: GHSA-76qp-h5mr-frr4
Advisory Summary

CVE-2025-27818 is a HIGH (CVSS 8.8) apache kafka deserialization of untrusted vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Kafka 2.11 libraries in the Maven ecosystem. The issue involves apache kafka deserialization of untrusted data vulnerability. Remediation is available by upgrading affected packages to version 3.9.1.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.kafka/kafka_2.11

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.kafka/kafka_2.11. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-76qp-h5mr-frr4 CVE-2025-27818 HIGH Apache Kafka Deserialization of Untrusted Data vulnerability
GHSA-mcwh-c9pg-xw43 CVE-2025-27819 HIGH Apache Kafka Deserialization of Untrusted Data vulnerability
GHSA-p7c9-8xx8-h74f CVE-2024-56128 LOW Apache Kafka's SCRAM implementation Incorrectly Implements Authentication Algorithm
GHSA-3j6g-hxx5-3q26 CVE-2021-38153 MODERATE Observable Discrepancy in Apache Kafka

CVE-2025-27818 at a Glance

CVE Identifier CVE-2025-27818
GHSA Identifier GHSA-76qp-h5mr-frr4
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Kafka 2.11
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2025-27818

To remediate this vulnerability, upgrade all affected Kafka 2.11 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.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.12 fixed: 3.9.1
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.12</artifactId>
    <version>3.9.1</version>
</dependency>
org.apache.kafka:kafka_2.13 fixed: 3.9.1
<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.13</artifactId>
    <version>3.9.1</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-2025-27818, 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.11 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.9.1), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Kafka 2.11, 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

A possible security vulnerability has been identified in Apache Kafka. This requires access to a alterConfig to the cluster resource, or Kafka Connect worker, and the ability to create/modify connectors on it with an arbitrary Kafka client SASL JAAS config and a SASL-based security protocol, which has been possible on Kafka clusters since Apache Kafka 2.0.0 (Kafka Connect 2.3.0). When configuring the broker via config file or AlterConfig command, or connector via the Kafka Kafka Connect REST API, an authenticated operator can set the `sasl.jaas.config` property for any of the connector's Kafka clients to "com.sun.security.auth.module.LdapLoginModule", which can be done via the `producer.override.sasl.jaas.config`, `consumer.override.sasl.jaas.config`, or `admin.override.sasl.jaas.config` properties. This will allow the server to connect to the attacker's LDAP server and deserialize the LDAP response, which the attacker can use to execute java deserialization gadget chains on the Kafka connect server. Attacker can cause unrestricted deserialization of untrusted data (or) RCE vulnerability when there are gadgets in the classpath. Since Apache Kafka 3.0.0, users are allowed to specify these properties in connector configurations for Kafka Connect clusters running with out-of-the-box configurations. Before Apache Kafka 3.0.0, users may not specify these properties unless the Kafka Connect cluster has been reconfigured with a connector client override policy that permits them. Since Apache Kafka 3.9.1/4.0.0, we have added a system property ("-Dorg.apache.kafka.disallowed.login.modules") to disable the problematic login modules usage in SASL JAAS configuration. Also by default "com.sun.security.auth.module.JndiLoginModule,com.sun.security.auth.module.LdapLoginModule" are disabled in Apache Kafka Connect 3.9.1/4.0.0. We advise the Kafka users to validate connector configurations and only allow trusted LDAP configurations. Also examine connector dependencies for vulnerable versions and either upgrade their connectors, upgrading that specific dependency, or removing the connectors as options for remediation. Finally, in addition to leveraging the "org.apache.kafka.disallowed.login.modules" system property, Kafka Connect users can also implement their own connector client config override policy, which can be used to control which Kafka client properties can be overridden directly in a connector config and which cannot.

CVE-2025-27818 Affected Kafka 2.11 Versions

3 component(s)
Fixed Versions:
3.9.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.kafka:kafka_2.11
Maven
≥ 2.3.0
≤ 2.4.1
org.apache.kafka:kafka_2.12
Maven
≥ 2.3.0
< 3.9.1
3.9.1
org.apache.kafka:kafka_2.13
Maven
≥ 2.4.0
< 3.9.1
3.9.1

References

Frequently Asked Questions

What is CVE-2025-27818?
CVE-2025-27818 is a security vulnerability in Kafka 2.11 involving Apache Kafka Deserialization of Untrusted Data vulnerability under CWE-502: Deserialization of Untrusted Data.
Which Kafka 2.11 versions are affected?
Affected versions include releases prior to 3.9.1 across affected packages: org.apache.kafka:kafka_2.11, org.apache.kafka:kafka_2.12, org.apache.kafka:kafka_2.13.
What version fixes CVE-2025-27818?
Upgrading to 3.9.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kafka_2.11 affected?
Yes, org.apache.kafka:kafka_2.11 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is kafka_2.12 affected?
Yes, org.apache.kafka:kafka_2.12 is affected in releases prior to 3.9.1. Upgrade your dependency to 3.9.1 or later.
What is the CVSS score of CVE-2025-27818?
CVE-2025-27818 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-27818?
CVE-2025-27818 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2025-27818?
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-76qp-h5mr-frr4",
  "modified" : "2025-12-11T20:27:16Z",
  "published" : "2025-06-10T09:30:31Z",
  "aliases" : [ "CVE-2025-27818" ],
  "summary" : "Apache Kafka Deserialization of Untrusted Data vulnerability",
  "details" : "A possible security vulnerability has been identified in Apache Kafka.\nThis requires access to a alterConfig to the cluster resource, or Kafka Connect worker, and the ability to create/modify connectors on it with an arbitrary Kafka client SASL JAAS config\nand a SASL-based security protocol, which has been possible on Kafka clusters since Apache Kafka 2.0.0 (Kafka Connect 2.3.0).\nWhen configuring the broker via config file or AlterConfig command, or connector via the Kafka Kafka Connect REST API, an authenticated operator can set the `sasl.jaas.config`\nproperty for any of the connector's Kafka clients to \"com.sun.security.auth.module.LdapLoginModule\", which can be done via the\n`producer.override.sasl.jaas.config`, `consumer.override.sasl.jaas.config`, or `admin.override.sasl.jaas.config` properties.\nThis will allow the server to connect to the attacker's LDAP server\nand deserialize the LDAP response, which the attacker can use to execute java deserialization gadget chains on the Kafka connect server.\nAttacker can cause unrestricted deserialization of untrusted data (or) RCE vulnerability when there are gadgets in the classpath.\n\nSince Apache Kafka 3.0.0, users are allowed to specify these properties in connector configurations for Kafka Connect clusters running with out-of-the-box\nconfigurations. Before Apache Kafka 3.0.0, users may not specify these properties unless the Kafka Connect cluster has been reconfigured with a connector\nclient override policy that permits them.\n\nSince Apache Kafka 3.9.1/4.0.0, we have added a system property (\"-Dorg.apache.kafka.disallowed.login.modules\") to disable the problematic login modules usage\nin SASL JAAS configuration. Also by default \"com.sun.security.auth.module.JndiLoginModule,com.sun.security.auth.module.LdapLoginModule\" are disabled in Apache Kafka Connect 3.9.1/4.0.0. \n\nWe advise the Kafka users to validate connector configurations and only allow trusted LDAP configurations. Also examine connector dependencies for \nvulnerable versions and either upgrade their connectors, upgrading that specific dependency, or removing the connectors as options for remediation. Finally,\nin addition to leveraging the \"org.apache.kafka.disallowed.login.modules\" system property, Kafka Connect users can also implement their own connector\nclient config override policy, which can be used to control which Kafka client properties can be overridden directly in a connector config and which cannot.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.11"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "last_affected" : "2.4.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "3.9.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.kafka:kafka_2.13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "3.9.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-27818"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/kafka"
  }, {
    "type" : "WEB",
    "url" : "https://kafka.apache.org/cve-list"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/06/09/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-10T20:23:15Z",
    "nvd_published_at" : "2025-06-10T08:15:22Z"
  }
}