Repository navigation
fix(deps): upgrade pillow to 13.0.0 for eight CVEs - #373
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades pillow from 12.3.0 to 13.0.0 to fix eight CVEs (CVE-2026-112895, CVE-2026-112400, CVE-2026-112397, CVE-2026-112896, CVE-2026-112897, CVE-2026-112395, CVE-2026-112404, CVE-2026-112899).
What changed
pillow>=12.3.0already permits 13.0.0, so no floor change was needed.Why
pip-audit flags pillow 12.3.0 against the eight advisories above; 13.0.0 is the fixed release. The 13.0.0 release notes (https://pillow.readthedocs.io/en/stable/releasenotes/13.0.0.html) list their own GHSA and CVE identifiers for the decoder, encoder, PDF and TIFF fixes, which do not use the same numbers as the list above, so the mapping between the two sets of identifiers was not independently confirmed here. After this change
make auditreports no known vulnerabilities.Risk assessment
Verdict: safe. I read the 13.0.0 release notes (backwards-incompatible changes, deprecations, API changes) and checked them against every Pillow use in the repo.
Removals and changes in 13.0.0: Python 3.10 dropped (repo requires 3.14 or newer); saving I mode images as PNG no longer clips;
Image.fromarraymode handling;Image.Image.get_child_images()moved;Image._showremoved;ImageCmsproduct_name and product_info removed;ExifTags.IFD.Makernoteremoved; IM format andJpegImageFile.load_djpegdeprecated;ImageColor.getcolor()premultiplied for RGBa and La; duplicate TIFF tags now keep the earliest value; small ICO saves; HarfBuzz now used for font hinting.Uses in the repo and assessment:
Image.open,Image.new,putdata(list(get_flattened_data())),save,getexif(),UnidentifiedImageError,ImageOps. None of these are removed or changed, andget_flattened_datawas already the non-deprecated accessor. The duplicate-TIFF-tag change changes which duplicate valuegetexif()reports for malformed files, and the strip path discards metadata regardless.Image.new(...).save(...)with RGB mode to JPEG or PNG. Not affected.Image.newplusImageDraw.Draw. No text rendering, so the HarfBuzz change does not apply.Image.new,savefor PNG, WEBP, TIFF and JPEG, andImageOps. Not affected.getsize,textsize,fromarray,ImageCms,ExifTags.IFD.Makernote, ICO, I mode, resampling constants orget_child_images.Verification
make verify(lockfile drift, lint, mypy, tests with coverage and per-module floors, i18n, doc-links, markers) on Python 3.14.5 exited 0. I read the whole log: "All checks passed!", "1770 passed, 1 skipped, 4 deselected in 538.07s (0:08:58)", and the final line "habitable: full gate green on Python 3.14.5". The installed pillow was 13.0.0.make audit(uv run pip-audit) result: "No known vulnerabilities found". It also printed cachecontrol cache-deserialization warnings, which are local cache noise.Stack note
This branch also carries the certifi bump from PR 372 as its first commit. That PR cannot merge on its own: its dependency audit fails on the same eight pillow advisories this change fixes. Merging this PR clears both, and PR 372 will be closed as superseded.
Prepared with AI assistance; reviewed before submission.