🇰🇷 한글 설명
Python 이미지 라이브러리인 Pillow의 PdfParser.PdfStream.decode() 함수에서 압축 해제 시 출력 크기를 제한하지 않는 취약점이 발견되었습니다. 공격자가 조작된 FlateDecode PDF 스트림을 사용하면 작은 파일로도 시스템 메모리를 고갈시킬 수 있습니다.
💡 쉬운 설명
특수하게 제작된 PDF 파일을 열 때 컴퓨터의 메모리를 순식간에 모두 써버리게 만드는 공격입니다. 이로 인해 프로그램이 멈추거나 컴퓨터 전체가 느려질 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. From 5.1.0 until 12.3.0, PdfParser.PdfStream.decode() in PIL/PdfParser.py calls zlib.decompress() with bufsize set to the PDF stream Length field without bounding the decompressed output size, allowing a crafted FlateDecode PDF stream to exhaust memory from a small file. This issue is fixed in version 12.3.0.
📍 영향받는 시스템
Pillow 5.1.0 버전부터 12.3.0 미만 버전
⚔️ 공격 벡터
조작된 FlateDecode 스트림이 포함된 PDF 파일을 처리하도록 유도
🛡️ 대응 방법
Pillow 라이브러리를 12.3.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전 번호가 12.3.0보다 낮으면 취약한 상태입니다.
pip show Pillow | grep Version