Skip to main content

CVE-2025-27819: CWE-502 Deserialization of Untrusted Data in Apache Software Foundation Apache Kafka

High
VulnerabilityCVE-2025-27819cvecve-2025-27819cwe-502
Published: Tue Jun 10 2025 (06/10/2025, 07:54:41 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache Kafka

Description

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

AI-Powered Analysis

AILast updated: 07/11/2025, 00:19:10 UTC

Technical Analysis

CVE-2025-27819 is a high-severity vulnerability affecting Apache Kafka, specifically related to the deserialization of untrusted data (CWE-502). This vulnerability extends the previously reported CVE-2023-25194, which involved remote code execution (RCE) and denial of service (DoS) attacks via the SASL JAAS JndiLoginModule configuration in the Kafka Connect API. The new finding reveals that not only Kafka Connect API but also Apache Kafka brokers themselves are vulnerable to this attack vector. Exploitation requires an attacker to have network access to the Kafka cluster and possess the AlterConfigs permission on the cluster resource, which allows modification of configuration settings. The vulnerability arises from the unsafe use of Java Authentication and Authorization Service (JAAS) login modules, particularly the "com.sun.security.auth.module.JndiLoginModule" and "com.sun.security.auth.module.LdapLoginModule", which can be abused to perform deserialization attacks leading to denial of service. Since Apache Kafka version 3.4.0, mitigations have been introduced by disabling these problematic login modules by default and providing a system property (-Dorg.apache.kafka.disallowed.login.modules) to explicitly disable them. In versions 3.9.1 and 4.0.0, these modules are disabled by default to reduce the attack surface. However, versions prior to 3.4.0, including the affected version 2.0.0, remain vulnerable if these modules are enabled. The CVSS 3.1 base score of 7.5 reflects a high severity, with network attack vector, low attack complexity, no privileges required, no user interaction, and an impact limited to availability (denial of service). No known exploits are currently reported in the wild, but the potential for disruption in Kafka clusters is significant given Kafka's critical role in real-time data streaming and messaging infrastructure.

Potential Impact

For European organizations, the impact of CVE-2025-27819 can be substantial. Apache Kafka is widely used across various industries including finance, telecommunications, manufacturing, and public services for real-time data processing and event streaming. A successful exploitation could lead to denial of service on Kafka brokers, disrupting critical data pipelines and causing outages in dependent applications and services. This could result in operational downtime, loss of data processing capabilities, and potential cascading failures in complex IT environments. Although the vulnerability does not directly lead to data confidentiality or integrity breaches, the availability impact alone can affect service-level agreements (SLAs), regulatory compliance (e.g., GDPR mandates on service availability), and business continuity. European organizations with Kafka clusters exposed to untrusted networks or with insufficient access controls are particularly at risk. The requirement for AlterConfigs permission limits the attack surface but insider threats or compromised credentials could facilitate exploitation. Given Kafka's role in critical infrastructure and digital services, disruption could have wide-reaching effects on sectors such as banking, healthcare, and government services within Europe.

Mitigation Recommendations

To mitigate CVE-2025-27819, European organizations should take the following specific actions beyond generic patching advice: 1) Upgrade Apache Kafka to version 3.9.1 or later where the vulnerable login modules are disabled by default. If immediate upgrade is not feasible, at minimum upgrade to 3.4.0 and configure the system property "-Dorg.apache.kafka.disallowed.login.modules" to explicitly disable "com.sun.security.auth.module.JndiLoginModule" and "com.sun.security.auth.module.LdapLoginModule". 2) Audit and restrict AlterConfigs permissions rigorously, ensuring only trusted administrators have this capability. Implement strict role-based access controls (RBAC) and monitor for anomalous configuration changes. 3) Limit network exposure of Kafka brokers by enforcing network segmentation, firewall rules, and use of private networks or VPNs to prevent unauthorized access. 4) Enable and monitor Kafka audit logs to detect suspicious configuration changes or login module usage. 5) Conduct regular security reviews of JAAS configurations and remove or disable any unnecessary or legacy login modules. 6) Implement strong authentication mechanisms and credential management to prevent credential compromise that could lead to privilege escalation. 7) Develop incident response plans specifically addressing Kafka service disruptions to minimize downtime in case of exploitation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
apache
Date Reserved
2025-03-07T10:02:19.848Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68487f551b0bd07c3938a250

Added to database: 6/10/2025, 6:54:13 PM

Last enriched: 7/11/2025, 12:19:10 AM

Last updated: 7/17/2025, 3:26:39 PM

Views: 23

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats