🇰🇷 한글 설명
Pillow 라이브러리 8.1.0부터 13.0.0 버전 사이에서 APNG 파일 처리 시 압축 폭탄 체크 이전에 전체 캔버스 크기만큼 메모리를 할당하는 취약점이 발견되었습니다. 공격자가 조작된 APNG 파일을 통해 시스템의 메모리를 고갈시켜 서비스 거부(DoS) 상태를 유발할 수 있습니다.
💡 쉬운 설명
이미지 파일을 열 때 실제 이미지 크기보다 훨씬 큰 가짜 크기를 설정하여 컴퓨터의 메모리를 순식간에 다 써버리게 만드는 공격입니다. 이로 인해 프로그램이 멈추거나 컴퓨터가 느려질 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. From 8.1.0 until 13.0.0, Pillow can allocate an APNG disposal background at the full canvas size before applying the decompression-bomb check. A crafted APNG with a small first frame, a very large declared canvas, and background disposal or first-frame OP_PREVIOUS reaches PngImageFile._seek while Image.open() positions frame zero. The full-canvas allocation occurs inside Image.open() without requiring pixel loading or frame iteration. This can exhaust memory and deny service. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Pillow library versions 8.1.0 through 13.0.0
⚔️ 공격 벡터
조작된 APNG 파일을 Image.open() 함수로 로드하여 메모리 할당 유도
🛡️ 대응 방법
Pillow 라이브러리를 13.0.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전이 13.0.0 미만인 경우 해당 취약점에 노출된 상태입니다.
pip show Pillow 2>/dev/null | grep Version