CVE-2016-3076: Buffer Overflow
Heap-based buffer overflow in the j2kencodeentry function in Pillow 2.5.0 through 3.1.1 allows remote attackers to cause a denial of service (memory corruption) via a crafted Jpeg2000 file.
Other sources
Pillow between 2.5.0 and 3.1.1 may overflow a buffer when reading rewriting a specially crafted Jpeg2000 file.
This occurs specifically in the function j2kencodeentry, at the line: state->buffer = malloc (tilewidth tileheight components prec / 8);
If this buffer is smaller than expected, the jpeg2k encoding functions will write outside the allocation and onto the heap, corrupting memory.
Reproducer and proposed fix can be found in original bug report:
https://bugzilla.redhat.com/showbug.cgi?id=1321422
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2016-3076?
CVE-2016-3076 has a high severity rating due to the potential for remote attackers to cause a denial of service through memory corruption.
How do I fix CVE-2016-3076?
To fix CVE-2016-3076, upgrade Pillow to version 3.1.2 or later.
Which versions of Pillow are affected by CVE-2016-3076?
CVE-2016-3076 affects Pillow versions from 2.5.0 through 3.1.1.
What is the impact of CVE-2016-3076?
The impact of CVE-2016-3076 includes memory corruption that can lead to application crashes.
Can CVE-2016-3076 affect my application?
Yes, if your application uses vulnerable versions of Pillow for processing Jpeg2000 files, it is at risk from CVE-2016-3076.