🇰🇷 한글 설명
Authlib 1.6.5 미만 버전에서 JWE의 zip=DEF 경로를 사용할 때 제한 없는 DEFLATE 압축 해제가 발생합니다. 공격자가 복호화 가능한 토큰을 제공할 경우, 매우 작은 암호문이 해제 시 수십~수백 메가바이트로 확장되어 메모리와 CPU를 고갈시키고 서비스 거부(DoS)를 유발할 수 있습니다.
💡 쉬운 설명
압축된 데이터를 풀 때 크기 제한을 확인하지 않아 발생하는 문제입니다. 아주 작은 파일을 보냈는데 컴퓨터가 이를 풀다가 엄청나게 큰 파일로 만들어버려 시스템이 멈추게 됩니다.
🇺🇸 원문 (English)
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JWE zip=DEF path performs unbounded DEFLATE decompression. A very small ciphertext can expand into tens or hundreds of megabytes on decrypt, allowing an attacker who can supply decryptable tokens to exhaust memory and CPU and cause denial of service. This issue has been patched in version 1.6.5. Workarounds for this issue involve rejecting or stripping zip=DEF for inbound JWEs at the application boundary, forking and add a bounded decompression guard via decompressobj().decompress(data, MAX_SIZE)) and returning an error when output exceeds a safe limit, or enforcing strict maximum token sizes and fail fast on oversized inputs; combine with rate limiting.
📍 영향받는 시스템
Authlib Python library versions prior to 1.6.5
⚔️ 공격 벡터
복호화 가능한 특수하게 조작된 JWE(JSON Web Encryption) 토큰을 전송하여 자원 고갈 유도
🛡️ 대응 방법
Authlib 라이브러리를 1.6.5 버전 이상으로 업데이트하거나, 입력 단계에서 zip=DEF 옵션을 제거 또는 토큰 크기를 제한해야 합니다.
🔧 검증 코드
출력된 버전이 1.6.5 미만이면 취약한 상태이며, 1.6.5 이상이면 안전합니다.
pip show authlib | grep Version
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
IBM WebSphere Application Server