🇰🇷 한글 설명
Authlib 1.9.0 미만 버전에서 JWTBearerGrant.get_audiences()가 빈 리스트를 반환하여 발생하는 취약점입니다. 이로 인해 JWT 검증 시 aud(audience) 값이 현재 인증 서버와 일치하는지 확인하지 않고 존재 여부만 체크하게 됩니다. 공격자는 다른 서비스용으로 발급된 유효한 토큰을 사용하여 신뢰 경계를 넘어 액세스 토큰을 획득할 수 있습니다.
💡 쉬운 설명
인증 라이브러리가 '이 토큰이 우리를 위해 만들어진 것인지'를 제대로 확인하지 않는 문제입니다. 따라서 다른 곳에서 쓰려고 만든 열쇠를 가져와도 우리 집 문을 열 수 있게 됩니다.
🇺🇸 원문 (English)
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, the default RFC 7523 JWTBearerGrant.get_audiences() returns an empty list, causing JWTBearerGrant.verify_claims() to require only that an aud claim exists without matching the current authorization server. An attacker holding a legitimate assertion for another service can present it to a server that shares the signing key and uses the default grant, obtaining an access token across a trust boundary. Implementations that override get_audiences() with the server's valid audience identifiers are not affected. This issue is fixed in version 1.9.0.
📍 영향받는 시스템
Authlib Python library versions prior to 1.9.0
⚔️ 공격 벡터
동일한 서명 키를 공유하는 다른 서비스의 유효한 JWT 토큰을 사용하여 인증을 우회함
🛡️ 대응 방법
Authlib 라이브러리를 1.9.0 버전 이상으로 업데이트하거나 get_audiences() 메서드를 직접 오버라이드하여 구현함
🔧 검증 코드
출력된 버전이 1.9.0 미만이면 취약한 상태이며, 1.9.0 이상이면 안전합니다.
pip show authlib | grep Version