🇰🇷 한글 설명
Authlib 1.9.0 미만 버전의 OpenIDMixin.parse_id_token() 함수에서 발생하는 취약점으로, 신뢰할 수 없는 ID 토큰의 nonce_supported 값을 읽어 nonce 검증을 무력화할 수 있습니다. 공격자가 유효하게 서명된 토큰을 탈취할 경우, nonce-to-session 바인딩을 우회하여 피해자의 토큰을 공격자의 세션으로 재전송(Replay)할 수 있습니다.
💡 쉬운 설명
로그인 과정에서 보안을 위해 사용하는 '일회용 번호(nonce)' 검증 절차를 공격자가 조작하여 무력화할 수 있는 문제입니다. 이를 통해 다른 사용자의 로그인 정보를 가로채어 자신의 계정처럼 사용하는 공격이 가능합니다.
🇺🇸 원문 (English)
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDMixin.parse_id_token() reads the nonce_supported decision from the untrusted ID token being validated and sets the expected nonce to null when that claim is the JSON boolean false. In implicit and hybrid relying parties, or applications that directly accept externally supplied ID tokens, an attacker with a captured validly signed token can bypass the nonce-to-session binding and replay the victim's token into an attacker-controlled session. Plain authorization code flow is not affected, and the token must still pass signature, issuer, and audience validation. OpenIDMixin.parse_id_token() trusts nonce_supported in both authlib/integrations/base_client/sync_openid.py and authlib/integrations/base_client/async_openid.py to disable the expected nonce. This issue is fixed in version 1.9.0.
📍 영향받는 시스템
Authlib Python library versions prior to 1.9.0
⚔️ 공격 벡터
탈취한 유효한 ID 토큰 내의 nonce_supported 클레임을 false로 조작하여 nonce 검증을 우회하고 토큰 재전송 공격 수행
🛡️ 대응 방법
Authlib 라이브러리를 1.9.0 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 1.9.0 미만인지 확인하여 취약 여부를 판단합니다.
pip show authlib | grep Version
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server