🇰🇷 한글 설명
Pillow 라이브러리 11.3.0부터 13.0.0 버전 사이에서 libtiff가 TIFF 데이터를 인메모리 버퍼로 인코딩할 때 태그를 거부하면 힙 Use-After-Free 취약점이 발생합니다. 공격자가 조작한 TIFF 태그를 사용하여 데이터를 저장할 경우, 오류 처리 과정에서 버퍼가 해제된 후 다시 접근되어 프로세스 충돌이나 임의 코드 실행이 가능해질 수 있습니다.
💡 쉬운 설명
이미지 처리 라이브러리인 Pillow에서 잘못된 이미지 파일을 처리할 때 메모리 관리 오류가 발생하는 문제입니다. 해커가 특수하게 만든 이미지를 통해 컴퓨터를 멈추게 하거나 악성 코드를 실행할 위험이 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. From 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding in ImagingLibTiffEncode; the error path then frees the output buffer without closing or clearing the TIFF handle, and later cleanup flushes through the write callback into freed memory, which can crash the process and may enable code execution. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Pillow version 11.3.0 ~ 13.0.0
⚔️ 공격 벡터
공격자가 조작된 TIFF 태그가 포함된 이미지 파일을 애플리케이션에 입력하여 메모리 오류 유도
🛡️ 대응 방법
Pillow 라이브러리를 최신 버전인 13.0.0 이상으로 업데이트
🔧 검증 코드
출력된 버전이 11.3.0 미만이거나 13.0.0 이상인지 확인하여 취약 여부를 판단합니다.
pip show Pillow | grep Version