Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 43 additions & 6 deletions docs/releasenotes/12.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,34 @@
Security
========

TODO
^^^^
Prevent FITS decompression bomb
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TODO
When decompressing GZIP data from a FITS image, Pillow did not limit the amount of data
being read, meaning that it was vulnerable to GZIP decompression bombs. This was
introduced in Pillow 10.3.0.

:cve:`YYYY-XXXXX`: TODO
^^^^^^^^^^^^^^^^^^^^^^^
The data being read is now limited to only the necessary amount.

Fix OOB write with invalid tile extents
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Pillow 12.1.1 added improved checks for tile extents to prevent an OOB write from
specially crafted PSD images in Pillow >= 10.3.0. However, these checks did not
consider integer overflow. This has been corrected.

Prevent PDF parsing trailer infinite loop
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TODO
When parsing a PDF, if a trailer refers to itself, or a more complex cyclic loop
exists, then an infinite loop occurs. Pillow now keeps a record of which trailers it
has already processed. PdfParser was added in Pillow 4.2.0.

Integer overflow when processing fonts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If a font advances for each glyph by an exceeding large amount, when Pillow keeps track
of the current position, it may lead to an integer overflow. This has been fixed.

API changes
===========
Expand Down Expand Up @@ -67,6 +86,11 @@ or scaling, optionally with a font size limit::
text.wrap(58, 10, "grow")
text.wrap(50, 50, ("grow", 12))

EXIF tag FrameRate
^^^^^^^^^^^^^^^^^^

The EXIF tag ``FrameRate`` has been added.

Other changes
=============

Expand All @@ -75,3 +99,16 @@ Support reading JPEG2000 images with CMYK palettes

JPEG2000 images with CMYK palettes can now be read. This is the first integration of
CMYK palettes into Pillow.

Lazy plugin loading
^^^^^^^^^^^^^^^^^^^

When opening or saving an image, Pillow now lazily loads only the required plugin
based on the file extension, instead of importing all plugins upfront. This makes
``open`` 2.3-15.6x faster and ``save`` 2.2-9x faster for common formats.

Thread safety for free-threaded Python
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Critical sections are now used to protect FreeType font objects, improving thread
safety when using fonts in the free-threaded build of Python.