You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #1015@homm wisely noted that CHANGES.rst is full of "one liners" and that sometimes more detail is needed, which led to the addition of release notes in #1032 corresponding with Pillow 2.7 which was the current release at the time. Thus formally implementing the procedure of adding release notes to every release since.
Fast forward to now and I've noticed that it's hard to find a comprehensive list of all security fixes with details including corresponding CVEs because prior to the release of Pillow 2.7 they are only listed in CHANGES.rst where very little detail is included.
So, I'm planning to back fill the release notes with the entire history of Pillow security fixes with details gathered from CHANGES.rst, git log and various CVE databases. This has to be done with some care so as to avoid providing confusing or even incorrect details about Pillow's security history.
For example, starting with Pillow 2.3.1 we have this commit:
The (1) load_djpeg function in JpegImagePlugin.py, (2) Ghostscript function in EpsImagePlugin.py, (3) load function in IptcImagePlugin.py, and (4) _copy function in Image.py in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 do not properly create temporary files, which allow local users to overwrite arbitrary files and obtain sensitive information via a symlink attack on the temporary file.
The (1) JpegImagePlugin.py and (2) EpsImagePlugin.py scripts in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 uses the names of temporary files on the command line, which makes it easier for local users to conduct symlink attacks by listing the processes.
Accordingly, to begin, I'll create docs/releasenotes/2.3.1.rst and add this information to it. Then I'll repeat the process for all releases between 2.3 to present that contain security fixes. Some but not all security fixes from 2.7 to present are already listed in release notes, but I want to confirm that.
Raise an error for an invalid number of bands in FPX image. CVE-2019-19911
Fixed an integer overflow in Jpeg2KEncode.c causing a buffer overflow. CVE-2016-3076
Fixed a buffer overflow in PcdDecode.c causing a segfault when opening PhotoCD files. CVE-2016-2533
Fixed a buffer overflow in FliDecode.c causing a segfault when opening FLI files. CVE-2016-0775
Fixed a buffer overflow in TiffDecode.c causing an arbitrary amount of memory to be overwritten when opening a specially crafted invalid TIFF file. CVE-2016-0740
In #1015 @homm wisely noted that CHANGES.rst is full of "one liners" and that sometimes more detail is needed, which led to the addition of release notes in #1032 corresponding with Pillow 2.7 which was the current release at the time. Thus formally implementing the procedure of adding release notes to every release since.
Fast forward to now and I've noticed that it's hard to find a comprehensive list of all security fixes with details including corresponding CVEs because prior to the release of Pillow 2.7 they are only listed in CHANGES.rst where very little detail is included.
So, I'm planning to back fill the release notes with the entire history of Pillow security fixes with details gathered from CHANGES.rst,
git logand various CVE databases. This has to be done with some care so as to avoid providing confusing or even incorrect details about Pillow's security history.For example, starting with Pillow 2.3.1 we have this commit:
And these details from NIST:
CVE-2014-1932
The (1) load_djpeg function in JpegImagePlugin.py, (2) Ghostscript function in EpsImagePlugin.py, (3) load function in IptcImagePlugin.py, and (4) _copy function in Image.py in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 do not properly create temporary files, which allow local users to overwrite arbitrary files and obtain sensitive information via a symlink attack on the temporary file.
CVE-2014-1933
The (1) JpegImagePlugin.py and (2) EpsImagePlugin.py scripts in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 uses the names of temporary files on the command line, which makes it easier for local users to conduct symlink attacks by listing the processes.
Accordingly, to begin, I'll create
docs/releasenotes/2.3.1.rstand add this information to it. Then I'll repeat the process for all releases between 2.3 to present that contain security fixes. Some but not all security fixes from 2.7 to present are already listed in release notes, but I want to confirm that.For example here's all the CVEs from CHANGES.rst:
And here's all CVEs mentioned in the release notes:
2023-44271: To protect against potential DOS attacks when using arbitrary strings as text2023-4863, by providing an updated install script and2023-50447: If an attacker has control over the keys passed to the2016-0740).2016-0775).PcdDecode.chas a buffer overflow error (:cve:2016-2533).2016-3076).2019-16865. The CVE is regarding DOS problems, such as consuming large2019-19911is regarding FPX images. If an image reports that it has a large2020-5311),2020-5312) or FLI image (:cve:2020-5313). Checks have been added2020-5310: Overflow checks have been added when calculating the size of a2020-10177Fix multiple out-of-bounds reads in FLI decoding2020-10378Fix bounds overflow in PCX decoding2020-10379Fix two buffer overflows in TIFF decoding2020-10994Fix bounds overflow in JPEG 2000 decoding2020-11538Fix buffer overflow in SGI-RLE decoding2.10.4_ to fix :cve:2020-15999:2020-15999).2020-35653Buffer read overrun in PCX decoding2020-35654Fix TIFF out-of-bounds write error2020-35655Fix for SGI Decode buffer overrun2021-25289: The previous fix for :cve:2020-35654was insufficient2021-25290: InTiffDecode.c, there is a negative-offsetmemcpy2021-25291: InTiffDecode.c, invalid tile boundaries could lead to2021-25292: The PDF parser has a catastrophic backtracking regex2021-25293: There is an out-of-bounds read inSgiRleDecode.c,2021-27921),2021-27922) and ICO (:cve:2021-27923) container formats2021-25287, :cve:2021-25288: Fix OOB read in Jpeg2KDecode2021-28675: Fix DOS in PsdImagePlugin2021-28676: Fix FLI DOS2021-28677: Fix EPS DOS on _open2021-28678: Fix BLP DOS2021-34552. PIL since 1.1.4 and Pillow since 1.02021-23437: Avoid a potential ReDoS (regular expression denial of service)2020-15999).2022-22817: To limit :py:class:PIL.ImageMathto working with images, Pillow2022-22815(:cwe:126) and :cve:2022-22816(:cwe:665) were2022-24303: If the path to the temporary directory on Linux or macOS2022-22817: While Pillow 9.0 restricted top-level builtins available to2022-30595: When reading a TGA file with RLE packets that cross scan lines,And here's all the CVEs mentioned in
git logalong with line numbers:If you have any comments/questions/concerns please add them here!