🇰🇷 한글 설명
Pillow 라이브러리 2.6.0부터 13.0.0 버전 사이에서 EPS 파일을 처리할 때 Ghostscript 인자 주입 취약점이 존재합니다. 공격자가 파일 이름을 조작하여 Ghostscript 옵션을 주입할 수 있으며, 특정 조건 하에 임의의 명령어를 실행할 수 있습니다.
💡 쉬운 설명
이미지 처리 프로그램이 파일 이름을 읽을 때, 파일 이름 자체를 프로그램 명령어로 착각하여 실행할 수 있는 보안 약점입니다. 나쁜 의도를 가진 파일 이름을 통해 해커가 컴퓨터에 몰래 명령을 내릴 수 있습니다.
🇺🇸 원문 (English)
Pillow is a Python imaging library. From 2.6.0 until 13.0.0, Pillow is vulnerable to argument injection when invoking Ghostscript for EPS input. EpsImagePlugin.Ghostscript passes a caller-controlled input filename after -f without converting it to a safe absolute path, so a name beginning with a hyphen can be interpreted as a Ghostscript option. An attacker who controls the filename can inject Ghostscript arguments. Arbitrary command execution specifically requires a leading @ argument-file filename and control of the referenced text file containing additional Ghostscript arguments; the reported chain reproduces with the default -dSAFER invocation. This issue is fixed in version 13.0.0.
📍 영향받는 시스템
Pillow version 2.6.0 to 13.0.0
⚔️ 공격 벡터
조작된 파일 이름을 가진 EPS 파일을 업로드하거나 처리하도록 유도하여 Ghostscript 인자 주입
🛡️ 대응 방법
Pillow 라이브러리를 13.0.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 13.0.0 미만인 경우 해당 취약점에 노출된 상태입니다.
pip show Pillow | grep Version