🇰🇷 한글 설명
joserfc는 JOSE(JSON Object Signing and Encryption) 표준을 구현한 Python 라이브러리입니다. 1.7.6 이전 버전에서는 compact JWS 역직렬화 시 크기 제한 검사 전에 bytes.split()을 호출하여, 공격자가 제어하는 대용량 토큰이 들어오면 추가 메모리 할당이 발생하고 이로 인해 서비스 거부(DoS)가 일어날 수 있습니다.
💡 쉬운 설명
악의적으로 아주 큰 토큰을 보내면 서버가 서명 검증 전에 많은 메모리를 사용하게 됩니다. 메모리가 부족해지면 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. Prior to 1.7.6, joserfc compact JWS deserialization calls bytes.split() before enforcing the existing aggregate segment-size limits. When attacker-controlled compact serialization bytes reach deserialize_compact(), the split creates copies of the header, payload, and signature segments before ExceededSizeError rejects them, causing an additional allocation approximately proportional to the supplied token. Requests that exhaust available process memory can therefore cause an availability failure even though signature verification fails. This issue is fixed in version 1.7.6.
📍 영향받는 시스템
joserfc Python 라이브러리 1.7.6 미만 버전을 사용하는 모든 시스템
⚔️ 공격 벡터
공격자가 deserialize_compact()에 과도하게 큰 compact JWS 토큰을 반복 전송하여 프로세스 메모리를 고갈시킴
🛡️ 대응 방법
joserfc를 1.7.6 이상으로 업데이트 (pip install --upgrade joserfc)
🔧 검증 코드
출력된 버전이 1.7.6 미만이면 취약하므로 업데이트가 필요하고, 1.7.6 이상이면 해당 취약점에 대해 패치된 상태입니다.
pip show joserfc 2>/dev/null | grep -i '^version'