CVE-2016-3076: Buffer Overflow

Published Mar 29, 2016
·
Updated

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

20 affected componentsFixes available
pip/pillow>=2.5.0<3.1.2
3.1.2
Python Pillow=2.5.0
Python Pillow=2.5.1
Python Pillow=2.5.2
Python Pillow=2.5.3
Python Pillow=2.6.0
Python Pillow=2.6.0-rc1
Python Pillow=2.6.1
Python Pillow=2.6.2
Python Pillow=2.7.0
Python Pillow=2.8.0
Python Pillow=2.8.1
Python Pillow=2.8.2
Python Pillow=2.9.0
Python Pillow=2.9.0-dev0
Python Pillow=2.9.0-dev1
Python Pillow=2.9.0-dev2
Python Pillow=3.0.0
Python Pillow=3.0.0-rc1
Python Pillow=3.1.0

Event History

Mar 29, 2016
Data Sourced
via Red Hat·11:53 AM
DescriptionSeverityAffected Software
Apr 24, 2017
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
Description
May 17, 2022
Advisory Published
via GitHub·02:47 AM

Frequently Asked Questions

1

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.

2

How do I fix CVE-2016-3076?

To fix CVE-2016-3076, upgrade Pillow to version 3.1.2 or later.

3

Which versions of Pillow are affected by CVE-2016-3076?

CVE-2016-3076 affects Pillow versions from 2.5.0 through 3.1.1.

4

What is the impact of CVE-2016-3076?

The impact of CVE-2016-3076 includes memory corruption that can lead to application crashes.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203