A possible security vulnerability has been identified in Apache Kafka Connect API. This requires access to a Kafka Connect worker, and the ability to create or modify connectors on it with an arbitrary Kafka client SASL JAAS config and a SASL-based security protocol, which has been possible on Kafka Connect clusters since Apache Kafka Connect 2.3.0. When configuring the connector via the 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.JndiLoginModule", 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. Attackers may leverage this vulnerability to cause unrestricted deserialization of untrusted data, leading to a remote code execution 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.4.0, a system property has been added to disable problematic login modules usage in SASL JAAS configuration. By default, "com.sun.security.auth.module.JndiLoginModule" is disabled in Apache Kafka Connect 3.4.0. Organizations should validate connector configurations and only allow trusted JNDI configurations. Additionally, they should examine connector dependencies for vulnerable versions and either upgrade their connectors or remove the connectors as options for remediation.
In light of the high CVSS score of 8.8 and the potential for remote code execution, organizations should prioritize patching immediately.
Vulnerability Details
The vulnerability is classified under CWE-502, indicating a deserialization of untrusted data. The affected versions include all versions of Apache Kafka Connect from 2.3.0 up to and including 3.3.2. The CVSS score is 8.8, indicating a high severity threat that can lead to significant impacts on confidentiality, integrity, and availability.
Technical Analysis
The root cause of this vulnerability stems from the ability of an authenticated operator to set insecure JNDI configurations within the Kafka Connect environment. The attack vector is network-based, with low complexity and low privileges required to exploit the vulnerability, meaning that an attacker can easily execute an attack without requiring extensive knowledge or access. There is no user interaction required, making it even more dangerous.
The impacts of this vulnerability are severe, with high potential for confidentiality, integrity, and availability impacts. Attackers can exploit this vulnerability to connect to malicious LDAP servers, leading to unauthorized access and control over the affected Kafka Connect server.
Risk & Impact Analysis
Risk to organizations includes potential unauthorized access to sensitive data, manipulation of data integrity, and unavailability of services. Given the high CVSS score of 8.8, organizations must assess their exposure to this vulnerability and prioritize remediation efforts. The urgency for addressing this vulnerability is critical, especially for those operating with vulnerable configurations.
Exploitation Status
Signal | Status |
|---|---|
Known Exploit | Yes |
Public PoC | Yes |
Actively Exploited | No |
Ransomware Use | No |
Affected Versions
The vulnerable versions of Apache Kafka Connect include all versions from 2.3.0 to 3.3.2. Organizations are advised to upgrade to the latest version of Kafka Connect to mitigate this vulnerability.
Mitigation & Remediation
Organizations should prioritize patching immediately. Upgrading to Apache Kafka Connect 3.4.0 or later will disable the problematic login modules usage by default. Additionally, organizations should validate connector configurations to only allow trusted JNDI configurations. They may also implement their own connector client config override policy to control which Kafka client properties can be overridden.
For best practices in securing your Kafka infrastructure, consider our services on penetration testing and continuous security assessments.
Detection Guidance
Organizations should monitor logs for unusual authentication attempts and any unauthorized configuration changes in Kafka Connect. Behavioral anomalies such as unexpected connections to LDAP servers may indicate exploitation attempts. Network signatures can also help detect malicious activities related to this vulnerability.
AppSecure Threat Intelligence Insight
This vulnerability highlights the importance of securing configuration management in cloud-native applications like Apache Kafka. Organizations should adopt a proactive approach to validate their configurations and dependencies regularly. For further insights on securing your applications, refer to our cloud penetration testing guide and consider our penetration testing methodology to enhance your security posture.
Additionally, understanding application vulnerabilities through our vulnerability management program can help mitigate future risks.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

.webp)