Vulnerabilities in pkg:maven/org.apache.kafka/kafka_2.13
PACKAGECVE-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.
pkg:maven/org.apache.kafka/kafka_2.13
Vulnerability advisories affecting package pkg:maven/org.apache.kafka/kafka_2.13. 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
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).
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.
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.11</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.12</artifactId>
<version>3.9.1</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>3.9.1</version>
</dependency>
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
CVE-2025-27818 Affected Kafka 2.11 Versions
3 component(s)| 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?
Which Kafka 2.11 versions are affected?
What version fixes CVE-2025-27818?
Is kafka_2.11 affected?
Is kafka_2.12 affected?
What is the CVSS score of CVE-2025-27818?
What CWE is associated with CVE-2025-27818?
How can I check Maven dependencies for CVE-2025-27818?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}