Cloudanix VulnDB

CVE-2025-27819

High · 7.5

Apache Kafka Deserialization of Untrusted Data vulnerability

CVSS

7.5

EPSS

1.0%

Published

Jun 10, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A configuration weakness in the messaging platform lets attackers with specific admin rights run harmful code or shut down the service.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Remote Code Execution
Component
Application
Class
Deserialization
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability permits remote code execution or denial of service via deserialization of attacker-controlled data in the SASL JAAS JndiLoginModule configuration on Apache Kafka brokers when the attacker possesses AlterConfigs permission on the cluster resource.

Why it matters to the business

Successful exploitation can lead to arbitrary code execution on brokers or service disruption, resulting in potential data exposure, messaging system outages, and infrastructure compromise; the low EPSS and lack of KEV listing indicate limited observed exploitation but the flaw affects core messaging infrastructure.

How an attack unfolds

An attacker first connects to the Kafka cluster and obtains AlterConfigs permission on the cluster resource, then modifies the broker JAAS configuration to reference a malicious JndiLoginModule pointing to an attacker-controlled directory service; triggering authentication causes a JNDI lookup that deserializes untrusted data to achieve RCE or DoS.

How to fix it

Upgrade Apache Kafka to 3.9.1 or 4.0.0 where com.sun.security.auth.module.JndiLoginModule and LdapLoginModule are disabled by default, or to at least 3.4.0 and set the system property -Dorg.apache.kafka.disallowed.login.modules to block problematic modules; apply the listed fixed versions for affected Android DownloadProvider packages.

How to confirm the fix worked

Verify the system property org.apache.kafka.disallowed.login.modules is set and contains the JndiLoginModule entries, confirm broker JAAS configurations no longer reference JndiLoginModule or LdapLoginModule, and test that AlterConfigs changes cannot introduce disallowed login modules.

Typical attack path

  1. Establish network connection to the Kafka cluster
  2. Acquire AlterConfigs permission on the cluster resource
  3. Use AlterConfigs to inject a malicious JAAS login module referencing JNDI
  4. Trigger authentication or configuration reload to initiate JNDI lookup and deserialization
  5. Execute arbitrary code or cause denial of service on the broker

How to detect it

Inspect Kafka broker audit and authentication logs for unexpected AlterConfigs operations on the cluster resource and any JAAS configuration changes that reference JndiLoginModule or external directory services.

What your security team should do

  • Immediately restrict AlterConfigs permissions to only trusted administrative principals
  • Apply the fixed versions listed for each affected Android DownloadProvider package or upgrade Kafka to 3.9.1/4.0.0
  • Enable the disallowed login modules system property on all brokers
  • Monitor for unauthorized configuration changes using audit logs
  • Review and harden SASL JAAS configurations across the environment

The record

In CVE-2023-25194, we announced the RCE/Denial of service attack via SASL JAAS JndiLoginModule configuration in Kafka Connect API. But not only Kafka Connect API is vulnerable to this attack, the Apache Kafka brokers also have this vulnerability. To exploit this vulnerability, the attacker needs to be able to connect to the Kafka cluster and have the AlterConfigs permission on the cluster resource. Since Apache Kafka 3.4.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" is disabled in Apache Kafka 3.4.0, and "com.sun.security.auth.module.JndiLoginModule,com.sun.security.auth.module.LdapLoginModule" is disabled by default in in Apache Kafka 3.9.1/4.0.0

Affected packages

Ecosystem Package Introduced Fixed
Maven org.apache.kafka:kafka 0 3.4.0
Maven org.apache.kafka:kafka_2.10 0 No fix
Maven org.apache.kafka:kafka_2.11 0 No fix
Maven org.apache.kafka:kafka_2.12 0 3.4.0
Maven org.apache.kafka:kafka_2.13 0 3.4.0
Maven org.apache.kafka:kafka_2.8.0 0 No fix
Maven org.apache.kafka:kafka_2.8.2 0 No fix
Maven org.apache.kafka:kafka_2.9.1 0 No fix
Maven org.apache.kafka:kafka_2.9.2 0 No fix
Bitnami kafka 2.0.0 3.4.1

Related vulnerabilities