kcve.ai취약점 정보 · 내 자산 확인

CVE-2023-25194 Apache Kafka Connect API: Possible RCE/Denial of service attack via SASL JAAS JndiLoginModule configuration using Kafka Connect

Apache Kafka Connect API: Kafka Connect를 사용한 SASL JAAS JndiLoginModule 구성을 통한 RCE/Denial 서비스 공격 가능

설명

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/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. 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.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 Connect 3.4.0. We advise the Kafka Connect users to validate connector configurations and only allow trusted JNDI 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.

Apache Kafka Connect API에서 가능한 보안 취약점이 확인되었습니다. 이 기능을 사용하려면 Kafka Connect 워커에 대한 액세스가 필요하며, 임의의 Kafka 클라이언트 SASL JAAS 설정과 Apache Kafka Connect 2.3.0 이후 Kafka Connect 클러스터에서 가능해진 SASL 기반 보안 프로토콜을 사용하여 커넥터를 생성/수정할 수 있는 기능이 필요합니다. Kafka Connect REST API를 통해 커넥터를 구성할 때 인증된 연산자는 커넥터의 Kafka 클라이언트에 대한 `sasl.jaas.config` 속성을 "com.sun.security.auth.module.JndiLoginModule"로 설정할 수 있습니다. `producer.override.sasl.jaas.config`, `consumer.override.sasl.jaas.config` 또는 `admin.override.sasl.jaas.config` 속성입니다. 이렇게 하면 서버가 공격자의 LDAP 서버에 연결하고 LDAP 응답을 역직렬화하여 공격자가 Kafka 연결 서버에서 Java 역직렬화(deserialization) 가젯 체인을 실행하는 데 사용할 수 있습니다. 클래스 경로에 가젯이 있을 때 공격자는 제한 없는 신뢰할 수 없는 데이터의 역직렬화(deserialization of untrusted data)(또는) RCE 취약성을 일으킬 수 있습니다. Apache Kafka 3.0.0부터 사용자는 즉시 구성으로 실행되는 Kafka Connect 클러스터의 커넥터 구성에서 이러한 속성을 지정할 수 있습니다. Apache Kafka 3.0.0 이전에는 Kafka Connect 클러스터가 이들을 허용하는 커넥터 클라이언트 재정의 정책으로 재구성되지 않는 한 이러한 속성을 지정할 수 없습니다. Apache Kafka 3.4.0부터 SASL JAAS 구성에서 문제가 되는 로그인 모듈 사용을 비활성화하기 위해 시스템 속성("-Dorg.apache.kafka.disallowed.login.modules")을 추가했습니다. 또한 기본적으로 "com.sun.security.auth.module.JndiLoginModule"은 Apache Kafka Connect 3.4.0에서 비활성화되어 있습니다. Kafka Connect 사용자에게 커넥터 구성을 검증하고 신뢰할 수 있는 JNDI 구성만 허용할 것을 권장합니다. 또한 취약한 버전에 대한 커넥터 종속성을 검사하고 커넥터를 업그레이드하거나 특정 종속성을 업그레이드하거나 커넥터를 해결 옵션으로 제거합니다. 마지막으로, "org.apache.kafka.disallowed.login.modules" 시스템 속성을 활용하는 것 외에도 Kafka Connect 사용자는 자신의 커넥터 클라이언트 구성 재정의 정책을 구현할 수 있습니다.이 정책은 커넥터 구성에서 Kafka 클라이언트 속성을 직접 재정의 할 수없고 제어할 수 없습니다.

영향 받는 제품 제품 1개

  • Apache Software Foundation

    Apache Kafka Connect API

    해결 버전 있음

    영향 받는 버전

    • 2.3.0 이상 3.4.0 미만

    해결 버전

    • 3.4.0 이상

참고 자료 3건

‹ 목록

점검 지원 범위 문의

도입 문의