🇰🇷 한글 설명
Pillow는 Python 이미지 처리 라이브러리입니다. 7.2.0부터 13.0.0 이전 버전에서는 MIC 이미지의 프레임 수를 확인하는 과정에서 무한 루프에 빠질 수 있습니다. 이는 MicImageFile이 TIFF 프레임 순회 로직을 상속받으면서 tell()과 seek()가 올바르게 동작하지 않아 발생하며, olefile이 설치된 환경에서 악성 MIC 파일을 읽으면 CPU를 지속적으로 점유합니다. 해당 문제는 13.0.0 버전에서 수정되었습니다.
💡 쉬운 설명
이미지 처리 도구(Pillow)가 특정 조작된 MIC 파일을 읽을 때 끝나지 않는 작업에 빠질 수 있습니다. 이 때문에 서버나 프로그램의 CPU가 계속 100%에 가깝게 사용되어 서비스가 느려지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. From 7.2.0 until 13.0.0, Pillow can enter an infinite loop while determining the frame count of a MIC image. MicImageFile inherits TIFF frame traversal, but MicImageFile.tell reports the OLE stream index and its seek() resets TIFF frame state, so an embedded TIFF with at least three IFDs never advances. When an application with olefile installed reads n_frames or saves all frames from a crafted MIC file, the non-advancing traversal can hold a worker at full CPU indefinitely. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Pillow 7.2.0 이상 13.0.0 미만이 설치되고 olefile이 함께 설치된 Python 환경
⚔️ 공격 벡터
공격자가 조작된 MIC 파일(내부에 3개 이상의 IFD를 가진 TIFF 포함)을 애플리케이션에 업로드하거나 처리하게 하여 무한 루프와 CPU 고갈을 유발
🛡️ 대응 방법
Pillow를 13.0.0 이상으로 업그레이드 (pip install --upgrade 'pillow>=13.0.0')
🔧 검증 코드
출력된 Pillow 버전이 7.2.0 이상 13.0.0 미만이고 olefile이 설치되어 있으면 취약하며, 13.0.0 이상이면 조치가 완료된 상태입니다.
python3 -c "import PIL; print(PIL.__version__)" 2>/dev/null && python3 -c "import olefile; print('olefile installed')" 2>/dev/null