🇰🇷 한글 설명
Pillow 라이브러리의 public rank-filter API에서 매우 큰 홀수 필터 크기를 입력할 경우 네이티브 힙 영역에 경계 외 쓰기(out-of-bounds write)가 발생할 수 있습니다. 이는 필터 크기 검증 전에 이미지 확장 함수가 호출되고, 확장 과정에서 부호 있는 정수 연산 오류가 발생하기 때문입니다.
💡 쉬운 설명
이미지 처리 도구인 Pillow에서 특수한 크기의 필터를 사용하면 컴퓨터 메모리의 잘못된 위치에 데이터를 쓰는 오류가 발생합니다. 이로 인해 프로그램이 강제로 종료되거나 해커가 시스템을 제어할 위험이 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. Prior to 12.3.0, Pillow's public rank-filter API can trigger a native heap out-of-bounds write when given a very large odd filter size because ImageFilter.RankFilter.filter() calls image.expand(size // 2, size // 2) before rank-filter size validation and ImagingExpand() computes output dimensions with unchecked signed int arithmetic. This issue is fixed in version 12.3.0.
📍 영향받는 시스템
Pillow 버전 12.3.0 미만 모든 버전
⚔️ 공격 벡터
조작된 필터 크기 값을 포함한 이미지 처리 요청을 통해 메모리 오버플로우 유도
🛡️ 대응 방법
Pillow 라이브러리를 최신 버전인 12.3.0 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 12.3.0보다 낮으면 취약한 상태입니다.
pip show Pillow | grep Version