Skip to main content
No exploitation reportedFix available

CVE-2025-27818

Apache Kafka: Possible RCE attack via SASL JAAS LdapLoginModule configuration

No exploitation reported by the sources we read.

  • Published2025-06-10
  • Fixed in3.9.1
  • WeaknessCWE-502

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2025-06-1008:15CVE publishedNVD

Versions per branch

NVD · OSV
Apache kafka
BranchAffectedFixed in
3.9≥ 2.3.0, < 3.9.13.9.1
3.9≥ 2.4.0, < 3.9.13.9.1
kafka_2.11
BranchAffectedFixed in
2.x≥ 2.3.0, ≤ 2.4.1no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As apache, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • Apache Software Foundation Apache Kafkaother versions: not affected
    Affected
    • ≥ 2.3.0, ≤ 3.9.0no fix statedsemver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2025-06-10

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • io.root.org.apache.kafka:kafka_2.12Root:Mavenall versions · fixed in 3.6.0-root.io.1and 1 other package
  • io.root.org.apache.kafka:kafka_2.12Root:Mavenall versions · fixed in 3.6.0-root.io.2and 1 other package
  • io.root.org.apache.kafka:kafka_2.12Root:Mavenall versions · fixed in 3.6.0-root.io.3and 1 other package
  • io.root.org.apache.kafka:kafka_2.12Root:Mavenall versions · fixed in 3.7.1-root.io.1and 1 other package
  • io.root.org.apache.kafka:kafka_2.12Root:Mavenall versions · fixed in 3.7.1-root.io.2and 1 other package
  • io.root.org.apache.kafka:kafka_2.12Root:Mavenall versions · fixed in 3.7.1-root.io.3and 1 other package
  • io.root.org.apache.kafka:kafka_2.12Root:Mavenall versions · fixed in 3.8.1-root.io.4and 1 other package
  • io.root.org.apache.kafka:kafka_2.13Root:Mavenall versions · fixed in 3.8.1-root.io.2

15 more package ranges on OSV.dev

Vendor advisories

  • CVE-2025-27818 Red Hat Product Security1 product fixed

    apache-kafka: Apache Kafka: Possible RCE attack via SASL JAAS LdapLoginModule configuration

  • RHSA-2025:23417 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Streams for Apache Kafka 3.1.0 release and security update

Full record on NVD

Fix

  1. Update Apache kafka to 3.9.1
  2. Vendor fix Red Hat Product Security RHSA-2025:23417 · 1 productBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  3. Workaround from the vendor Red Hat Product Security RHSA-2025:23417 · 1 productMitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published
2025-06-10
Last Modified
2026-06-17
NVD status
Analyzed
GitHub Advisory
GHSA-76qp-h5mr-frr4

Frequently asked questions

What is CVE-2025-27818?

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.

Is CVE-2025-27818 actively exploited?

Active exploitation of CVE-2025-27818 has not been confirmed. Its EPSS score was 1.1% on 2026-11-18, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2025-27818?

CVE-2025-27818 has a CVSS v3 base score of 8.8 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

Running kafka? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record