🇰🇷 한글 설명
Authlib 1.0.0부터 1.6.5 버전 사이에서 캐시 기반의 상태 및 요청 토큰 저장소가 초기 사용자 세션과 연결되지 않는 취약점이 발견되었습니다. 이로 인해 공격자가 유효한 상태 값을 획득할 경우 CSRF 공격이 가능해집니다. 해당 문제는 1.6.6 버전에서 패치되었습니다.
💡 쉬운 설명
로그인 과정에서 사용자를 확인하는 임시 데이터가 누구의 것인지 제대로 구분하지 못하는 문제입니다. 이로 인해 공격자가 사용자의 의도와 상관없이 특정 동작을 수행하게 만드는 공격이 가능합니다.
🇺🇸 원문 (English)
Authlib is a Python library which builds OAuth and OpenID Connect servers. In versions 1.0.0 through 1.6.5, cache-backed state/request-token storage is not tied to the initiating user session, so CSRF is possible for any attacker that has a valid state (easily obtainable via an attacker-initiated authentication flow). When a cache is supplied to the OAuth client registry, FrameworkIntegration.set_state_data writes the entire state blob under _state_{app}_{state}, and get_state_data ignores the caller’s session altogether. This issue has been patched in version 1.6.6.
📍 영향받는 시스템
Authlib 1.0.0 ~ 1.6.5
⚔️ 공격 벡터
공격자가 인증 흐름을 통해 획득한 유효한 상태(state) 값을 이용하여 사용자 세션과 무관하게 CSRF 공격 수행
🛡️ 대응 방법
Authlib 라이브러리를 1.6.6 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전이 1.6.6 미만(1.0.0~1.6.5)이면 취약한 상태입니다.
pip show authlib | grep Version