PT-2012-16: Buffer Overflow in Pillow library
Version: 1.7.8 and earlier
Severity level: Medium
Impact: Buffer Overflow
Access Vector: Remote
Base Score: 4.3
CVE: not assigned
Pillow is an open source Python library that is developed to handle images.
The specialists of the Positive Research center have detected a Buffer Overflow vulnerability in Pillow library.
Vulnerablity in libImaging/Storage.c file
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:
How to fix
Update your software up to the latest version
25.06.2012 - Vendor gets vulnerability details
18.07.2012 - Vulnerability details were sent to CERT
15.03.2013 - Vendor releases fixed version and details
10.10.2013 - Public disclosure
The vulnerability was detected by Pavel Toporkov, Positive Research Center (Positive Technologies Company)
Reports on the vulnerabilities previously discovered by Positive Research: