🇰🇷 한글 설명
Authlib은 OAuth 및 OpenID Connect 서버를 구축하는 Python 라이브러리입니다. 0.15부터 1.9.1 이전 버전에서 ClientConfigurationEndpoint의 문서화된 참조 구현은 요청 데이터의 client_id로 대상 클라이언트를 조회하고 편집 가능 여부만 확인하며, 요청의 자격 증명(credential)이 해당 대상 클라이언트에 속하는지 검증하지 않습니다. 이로 인해 유효한 등록 액세스 토큰을 가진 클라이언트가 다른 클라이언트의 등록 정보를 읽거나 수정하거나 삭제할 수 있습니다.
💡 쉬운 설명
정상적으로 등록된 프로그램이라면 누구나 다른 프로그램의 설정을 훔쳐보거나 바꿀 수 있는 취약점입니다. 리다이렉트 주소가 변경되면 인증 코드나 토큰이 탈취될 수 있고, 등록이 삭제되면 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
Authlib is a Python library which builds OAuth and OpenID Connect servers. From 0.15 until 1.9.1, the documented ClientConfigurationEndpoint.authenticate_client and ClientConfigurationEndpoint.check_permission reference implementations look up a target client from request-controlled client_id data and check only whether that target is editable, without verifying that request.credential belongs to the target client. Deployments following both examples can allow a client holding any valid registration access token to read, modify, or delete another client's registration. Changing redirect_uris can enable authorization code or token interception, while deleting registrations can deny service to affected clients. This issue is fixed in version 1.9.1.
📍 영향받는 시스템
Authlib 0.15 이상 1.9.1 미만 버전 (ClientConfigurationEndpoint 참조 구현을 사용하는 환경)
⚔️ 공격 벡터
유효한 등록 액세스 토큰을 보유한 클라이언트가 client_id를 다른 클라이언트의 값으로 조작해 해당 클라이언트의 등록 정보를 조회·수정·삭제
🛡️ 대응 방법
Authlib을 1.9.1 이상으로 업그레이드하고, 자격 증명이 대상 client_id의 소유자와 일치하는지 검증하는 커스텀 로직을 적용
🔧 검증 코드
출력된 버전이 1.9.1 미만이면 취약하며, 1.9.1 이상이면 패치된 버전입니다.
pip show authlib 2>/dev/null | grep -i '^version'