🇰🇷 한글 설명
OAuthLib의 PKCE 검증 과정에서 문자열 비교 시 타이밍 차이가 발생하는 취약점이 발견되었습니다. 공격자가 반복적인 측정을 통해 code_verifier 값을 유추할 수 있으며, 이를 통해 권한 없는 액세스 토큰 획득 및 계정 탈취가 가능할 수 있습니다.
💡 쉬운 설명
비밀번호를 확인할 때 글자가 틀리면 즉시 멈추는 방식 때문에, 답변이 얼마나 빨리 돌아오느냐를 보고 비밀번호의 앞부분을 알아낼 수 있는 문제입니다. 이를 통해 해커가 사용자의 계정에 몰래 접속할 위험이 있습니다.
🇺🇸 원문 (English)
OAuthLib is an implementation of the OAuth request-signing logic for Python 3.6+. From 3.0.0 until 4.0.0, OAuthLib's PKCE checks in oauthlib/oauth2/rfc6749/grant_types/authorization_code.py compare attacker-supplied code_verifier values with stored challenges using ordinary string equality in code_challenge_method_plain and code_challenge_method_s256. Because the comparison can return after a length difference or the first mismatching character, repeated token endpoint measurements can reveal common-prefix timing information that could potentially allow recovery of the code_verifier, unauthorized access-token acquisition, and account takeover. Practical exploitation requires an intercepted, single-use authorization code and enough measurements to overcome real-world network noise; the local timing benchmark does not establish practical remote account takeover, so the weakness remains a defense-in-depth concern. This issue is fixed in version 4.0.0.
📍 영향받는 시스템
OAuthLib 3.0.0 ~ 4.0.0 미만 버전
⚔️ 공격 벡터
네트워크 응답 시간을 정밀하게 측정하는 타이밍 공격 (Timing Attack)
🛡️ 대응 방법
OAuthLib를 4.0.0 이상의 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 Version이 4.0.0 미만이면 취약한 상태입니다.
pip show oauthlib | grep Version