🇰🇷 한글 설명
Apache Kafka의 기본 JWT 검증 클래스가 토큰의 서명, 발행자 또는 대상(audience)을 검증하지 않는 보안 취약점이 발견되었습니다. 공격자는 임의의 발행자로부터 특정 사용자의 이름을 포함한 JWT를 생성하여 브로커에 인증을 통과할 수 있습니다.
💡 쉬운 설명
로그인할 때 신분증이 진짜인지 확인하지 않고 이름만 보고 통과시켜주는 보안 구멍이 발견되었습니다. 해커가 가짜 신분증을 만들어도 시스템이 이를 진짜로 믿고 접속을 허용할 수 있습니다.
🇺🇸 원문 (English)
A possible security vulnerability has been identified in Apache Kafka.
By default, the broker property `sasl.oauthbearer.jwt.validator.class` is set to `org.apache.kafka.common.security.oauthbearer.DefaultJwtValidator`. It accepts any JWT token without validating its signature, issuer, or audience. An attacker can generate a JWT token from any issuer with the `preferred_username` set to any user, and the broker will accept it.
We advise the Kafka users using kafka v4.1.0 or v4.1.1 to set the config `sasl.oauthbearer.jwt.validator.class` to `org.apache.kafka.common.security.oauthbearer.BrokerJwtValidator` explicitly to avoid this vulnerability. Since Kafka v4.1.2 and v4.2.0 and later, the issue is fixed and will correctly validate the JWT token.
📍 영향받는 시스템
Apache Kafka v4.1.0, v4.1.1
⚔️ 공격 벡터
임의의 발행자로부터 특정 사용자의 preferred_username이 설정된 위조된 JWT 토큰을 생성하여 브로커에 전달
🛡️ 대응 방법
Kafka v4.1.2 또는 v4.2.0 이상으로 업데이트하거나, v4.1.x 버전 사용 시 sasl.oauthbearer.jwt.validator.class를 BrokerJwtValidator로 명시적 설정
🔧 검증 코드
설정 파일에서 해당 값이 DefaultJwtValidator로 되어 있다면 취약하며, BrokerJwtValidator로 설정되어 있어야 안전합니다.
grep -r "sasl.oauthbearer.jwt.validator.class" /path/to/kafka/config/server.properties