PT-2012-16: Buffer Overflow in Pillow library Vulnerable softwarePillow library Version: 1.7.8 and earlierLink: https://github.com/python-imaging/PillowSeverity levelSeverity level: Medium Impact: Buffer Overflow Access Vector: Remote CVSS v2: Base Score: 4.3 Vector: (AV:N/AC:M/Au:N/C:N/I:N/A:P)CVE: not assignedSoftware descriptionPillow is an open source Python library that is developed to handle images. Vulnerability descriptionThe specialists of the Positive Research center have detected a Buffer Overflow vulnerability in Pillow library.Vulnerablity in libImaging/Storage.c fileVulnerable code: 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 fixUpdate your software up to the latest versionAdvisory status25.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 disclosureCreditsThe vulnerability was detected by Pavel Toporkov, Positive Research Center (Positive Technologies Company)Referenceshttp://en.securitylab.ru/lab/PT-2012-16 Reports on the vulnerabilities previously discovered by Positive Research:http://www.ptsecurity.com/research/advisory/ http://en.securitylab.ru/lab/