🇰🇷 한글 설명
Pillow 13.0.0 미만 버전의 PILfont에서 텍스트 너비 계산 시 음수 글리프 진행 값을 INT_MIN과 비교하지 않아 정수 오버플로가 발생합니다. 이로 인해 계산된 너비가 비정상적으로 커질 수 있으며, 이는 로직 무결성 오류나 리소스 과다 소비로 이어질 수 있습니다.
💡 쉬운 설명
이미지 처리 라이브러리에서 글자 크기를 계산할 때 숫자가 너무 작아지면 오류가 발생하는 문제입니다. 이 오류를 이용하면 컴퓨터가 처리하기 힘든 엄청나게 큰 크기를 만들어 시스템에 과부하를 줄 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. Prior to 13.0.0, PILfont text-width accumulation in src/_imaging.c checks positive glyph advances against INT_MAX but does not check negative advances against INT_MIN. Repeating a signed 16-bit advance of -32768 can therefore execute a signed C integer overflow in xsize += dx, producing a large positive width from a negative mathematical result. Applications that use getlength(), getsize(), or derived layout, quota, serialization, or allocation calculations can experience logic-integrity errors or resource consumption, while the high-level mask path commonly retains a decompression-bomb check. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Pillow (Python Imaging Library) 13.0.0 미만 버전
⚔️ 공격 벡터
특수하게 조작된 음수 진행 값을 가진 글리프를 사용하여 텍스트 너비 계산 로직을 유도
🛡️ 대응 방법
Pillow 라이브러리를 최신 버전인 13.0.0 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 13.0.0보다 낮으면 취약한 상태입니다.
pip show Pillow | grep Version