🇰🇷 한글 설명
Pillow 라이브러리 5.1.0부터 13.0.0 버전 사이에서 PDF 파일을 추가(append)할 때 리소스 고갈 문제가 발생할 수 있습니다. 공격자가 조작된 PDF를 제공하면 재귀 오류(RecursionError)가 발생하거나 CPU 및 메모리 사용량이 급증하여 서비스 거부(DoS) 상태를 유발할 수 있습니다.
💡 쉬운 설명
이미지 처리 프로그램이 특수하게 만들어진 PDF 파일을 읽을 때, 컴퓨터의 메모리와 계산 능력을 과도하게 사용하여 프로그램이 멈추게 만드는 취약점입니다. 나쁜 의도를 가진 파일이 시스템에 전달되면 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can exhaust resources while parsing an existing PDF during an append operation. PdfParser follows page-tree child references without cycle or duplication tracking and follows previous-trailer chains with only an exact repeated-offset guard, so deep or cyclic page trees and long chains of unique trailer offsets can exhaust the Python stack. Repeated non-cyclic /Kids references can also cause super-linear CPU and memory use. An attacker can supply such a PDF to an application that calls Image.save with PDF append enabled. This can raise an uncaught RecursionError or consume excessive CPU and memory before output is written, causing denial of service. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Pillow library versions 5.1.0 through 13.0.0
⚔️ 공격 벡터
PDF 추가 기능(append)이 활성화된 상태에서 Image.save를 호출하는 애플리케이션에 조작된 PDF 파일 전달
🛡️ 대응 방법
Pillow 라이브러리를 13.0.0 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 13.0.0 미만인지 확인하여 취약 여부를 판단합니다.
pip show Pillow | grep Version