🇰🇷 한글 설명
Pillow 라이브러리 13.0.0 미만 버전에서 SpiderImagePlugin.py의 seek() 함수가 스택 프레임을 재파싱할 때 압축 폭탄 체크를 건너뛰는 취약점이 존재합니다. 공격자는 작은 파일로 검사를 통과한 뒤 나중에 매우 큰 크기를 선언하여 시스템 메모리를 수 기가바이트까지 소모하게 만들 수 있습니다.
💡 쉬운 설명
이미지 파일을 읽을 때 크기 검사를 제대로 하지 않아 발생하는 문제입니다. 아주 작은 이미지 파일로 위장하여 컴퓨터의 메모리를 순식간에 가득 채워 시스템을 멈추게 할 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. Prior to 13.0.0, SpiderImageFile.seek() in src/PIL/SpiderImagePlugin.py reparses a later SPIDER stack frame and replaces self._size without rerunning Image._decompression_bomb_check(). A tiny file can use a safe first frame to pass Image.open() and then declare very large dimensions in a later mode F frame. Loading that frame allocates approximately four bytes per attacker-declared pixel and can consume multiple gigabytes of memory. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Python Pillow library versions prior to 13.0.0
⚔️ 공격 벡터
조작된 SPIDER 형식의 이미지 파일을 로드하여 메모리 고갈 유도
🛡️ 대응 방법
Pillow 라이브러리를 13.0.0 버전 이상으로 업데이트
🔧 검증 코드
출력된 Version이 13.0.0 미만이면 취약한 상태입니다.
pip show Pillow | grep Version