🇰🇷 한글 설명
Authlib 1.9.0 미만 버전의 OpenIDImplicitGrant 클래스에서 발생하는 취약점입니다. 검증 과정에서 필터링된 scope 대신 클라이언트가 제어 가능한 원본 payload.scope를 확인하여, 허용되지 않은 openid 범위를 추가하고 서명된 ID 토큰을 탈취할 수 있습니다.
💡 쉬운 설명
로그인 과정에서 사용자가 허락하지 않은 정보까지 몰래 요청하여 개인 정보를 담은 토큰을 받아낼 수 있는 보안 결함입니다. 공격자가 권한 범위를 조작하여 사용자의 신원 정보를 가로챌 위험이 있습니다.
🇺🇸 원문 (English)
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDImplicitGrant.validate_authorization_request() checks the client-controlled raw request.payload.scope for openid after the parent grant has filtered allowed scopes into request.scope. A registered client permitted an ID token response type but not the openid scope can add openid to the request, obtain user consent, and receive a signed ID token containing the user's subject and allowed profile claims. Authorization code flow and deployments that allow openid for every client permitted an ID token response are not affected. In authlib/oidc/core/grants/implicit.py, OpenIDImplicitGrant.validate_authorization_request() checks request.payload.scope instead of the filtered request.scope. This issue is fixed in version 1.9.0.
📍 영향받는 시스템
Authlib Python library versions prior to 1.9.0
⚔️ 공격 벡터
클라이언트가 조작된 request.payload.scope를 통해 openid 범위를 주입하여 ID 토큰을 요청함
🛡️ 대응 방법
Authlib 라이브러리를 1.9.0 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 1.9.0 미만이면 취약한 상태이며, 1.9.0 이상이면 안전합니다.
pip show authlib | grep Version