🇰🇷 한글 설명
Pillow 라이브러리의 멀티 프레임 로더에서 메모리 할당 오류로 인해 발생하는 취약점입니다. 특정 이미지 포맷(PSD, MPO 등)의 프레임 전환 시 이전의 좁은 메모리 할당 영역에 더 큰 데이터를 쓰게 되어 메모리 범위를 벗어난 쓰기 또는 읽기가 발생하며, 이는 시스템 충돌이나 원격 코드 실행으로 이어질 수 있습니다.
💡 쉬운 설명
이미지 파일을 읽을 때 메모리 공간을 잘못 계산하여, 준비된 공간보다 더 큰 데이터를 억지로 집어넣는 문제입니다. 이를 통해 해커가 컴퓨터를 멈추게 하거나 몰래 명령어를 실행할 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. From 11.0.0 until 13.0.0, multi-frame loaders can retain an ImagingCore allocation created for a narrow frame mode while a later frame of the same dimensions changes the logical mode and decoder tiles to wider RGB or CMYK data. ImageFile.load_prepare() reuses the stale native storage because _im is non-null without verifying that its mode and size still match. Crafted PSD, MPO, DCX, or MIC frame transitions can then write wider pixels into the narrow allocation, causing native out-of-bounds writes and crashes. The MPO path can also cause a native over-read and, in demonstrated runtime-specific profiles, command execution. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Pillow 11.0.0 버전부터 13.0.0 미만 버전
⚔️ 공격 벡터
조작된 PSD, MPO, DCX 또는 MIC 이미지 파일을 통해 메모리 범위를 벗어난 쓰기/읽기 유도
🛡️ 대응 방법
Pillow 라이브러리를 13.0.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전이 13.0.0 미만(예: 11.x.x, 12.x.x)이면 취약한 상태입니다.
pip show Pillow | grep Version