KafkaApplication · Apache

CVE-2025-27818

HIGH · 8.8 CVSS v3.1 Published 2025-06-10
Fix available
A fix is available. Upgrade to 3.9.1 or later.
See remediation →
94/100
Remediation priority · Urgent
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Authenticated Kafka Connect operators with alterConfig access can set sasl.jaas.config to LdapLoginModule via connector property overrides, forcing the Kafka Connect server to connect to an attacker-controlled LDAP server. The deserialized LDAP response enables Java deserialization gadget chain exploitation, leading to RCE.

MitigationUpgrade to Kafka 3.9.1/4.0.0+ which disables problematic login modules by default, or set -Dorg.apache.kafka.disallowed.login.modules=com.sun.security.auth.module.LdapLoginModule,com.sun.security.auth.module.JndiLoginModule and implement a restrictive connector client config override policy.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
KafkaApplication
Affected:>= 2.3.0, < 3.9.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Verify Kafka version is within affected range
    Run 'kafka-topics.sh --version' or 'kafka_2.XX-XX.X.X.jar' in the Kafka lib directory, or check the version string from your Kafka distribution
    Affected if The installed version is >= 2.3.0 and < 3.9.1
  2. Confirm Kafka Connect is deployed
    Check for running Kafka Connect processes, or look for connect-distributed.properties or connect-standalone.properties configuration files in your deployment
    Affected if Kafka Connect is actively running or configured in your environment
  3. Inspect connector configurations for sasl.jaas.config override
    Query the Connect REST API GET /connectors or review connector property files for the property 'sasl.jaas.config' in the connector config or connector.client.config.override.policy settings
    Affected if Any connector configuration contains or can override sasl.jaas.config with LdapLoginModule or JndiLoginModule values
  4. Check for alterConfig ACL permissions on Connect principals
    Review Kafka ACLs using kafka-acls.sh --list or your authorization backend for principals with ALTER_CONFIGS permission on Connect resource types
    Affected if Any Kafka user or service account has ALTER_CONFIGS or ALTER_CONFIGS_ON_CONNECT permission that can modify connector configurations

Your environment is affected if running a Kafka version between 2.3.0 and 3.9.1 with Kafka Connect enabled, where untrusted principals have alterConfig access and can override sasl.jaas.config to inject LDAP login module configuration.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 3.9.1 or later
Fixed in 3.9.1
Interim mitigation

Upgrade to Kafka 3.9.1/4.0.0+ which disables problematic login modules by default, or set -Dorg.apache.kafka.disallowed.login.modules=com.sun.security.auth.module.LdapLoginModule,com.sun.security.auth.module.JndiLoginModule and implement a restrictive connector client config override policy.

Recommended fix High confidence

Kafka 3.9.1 or 4.0.0

  1. 1. Upgrade Apache Kafka to version 3.9.1 or 4.0.0 to obtain the permanent fix with disallowed login modules disabled by default.
  2. 2. As an additional configuration mitigation, add the JVM system property `-Dorg.apache.kafka.disallowed.login.modules` to your Kafka Connect startup scripts (e.g., `connect-distributed.sh`, `connect-standalone.sh`). Set it to include both problematic modules: `com.sun.security.auth.module.JndiLoginModule,com.sun.security.auth.module.LdapLoginModule`.
  3. 3. Validate all existing connector configurations to ensure they do not contain untrusted or malicious LDAP settings in `producer.override.sasl.jaas.config`, `consumer.override.sasl.jaas.config`, or `admin.override.sasl.jaas.config` properties.
  4. 4. Implement a custom connector client config override policy in your Kafka Connect configuration (`connector.client.config.override.policy`) to restrict which properties can be overridden in connector configurations, preventing attackers from setting the problematic SASL JAAS config properties.
Caveat Upgrading between major versions may introduce compatibility considerations; thoroughly test connectors and configurations in a staging environment before deploying to production.

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Kafka Scoped from the published advisory
  • Consultation4.0 h
  • Implementation6.0 h
  • Testing4.0 h
  • Review / QA2.0 h
16.0 hours of engineering $2,840
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,544.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-27818 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-27818 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data