PIL (Python Imaging Library) and Pillow libraries Version: all OS: Archlinux only
Severity: Medium Impact: Buffer Overflow Attack vector: remote
Base Score: 4.3
Vector: (AV:N/AC:M/Au:N/C:N/I:N/A:P) CVE: not assign
PIL is an open source Python library that is developed to handle images.
The specialists of Positive Research, the Positive Technologies company, detected a buffer overflow vulnerability in PIL and Pillow libraries.
Vulnerablity in libImaging/Storage.c file
Vulnerable code: 186 strcpy(im->mode, mode);
im->mode is an array of 5 bytes. If an attacker manages to load an image with YCbCr color space, it cause off-by-one error because of terminated NULL-byte.
Example of a vulnerable code: from PIL import Image Image.frombuffer('YCbCr',(1,1), '1')
Credits The vulnerability was detected by Pavel Toporkov, Positive Research Center (Positive Technologies Company)