Skip to content

fix(deps): upgrade pillow to 13.0.0 for eight CVEs - #373

Merged
ChelseaKR merged 2 commits into
mainfrom
deps/pillow-13
Oct 21, 2026
Merged

ChelseaKR merged 2 commits into
mainfrom
deps/pillow-13

Conversation

@ChelseaKR

Copy link
Copy Markdown
Owner

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

  • uv.lock: pillow 12.3.0 to 13.0.0 (version, sdist and wheel hashes). No other package moved.
  • pyproject.toml is untouched: the existing constraint pillow>=12.3.0 already permits 13.0.0, so no floor change was needed.
  • No hashed requirements files or deploy bundles in this repo are generated from the lock for pillow.

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 audit reports 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.fromarray mode handling; Image.Image.get_child_images() moved; Image._show removed; ImageCms product_name and product_info removed; ExifTags.IFD.Makernote removed; IM format and JpegImageFile.load_djpeg deprecated; 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:

  • src/habitable/exif.py: Image.open, Image.new, putdata(list(get_flattened_data())), save, getexif(), UnidentifiedImageError, ImageOps. None of these are removed or changed, and get_flattened_data was already the non-deprecated accessor. The duplicate-TIFF-tag change changes which duplicate value getexif() reports for malformed files, and the strip path discards metadata regardless.
  • src/habitable/demo.py, scripts/make_golden_packet.py, scripts/make_golden_correspondence_packet.py, scripts/report_perf_profile.py: Image.new(...).save(...) with RGB mode to JPEG or PNG. Not affected.
  • scripts/make_site_sample.py: Image.new plus ImageDraw.Draw. No text rendering, so the HarfBuzz change does not apply.
  • tests (conftest.py, test_sync.py, test_evidence_exif.py, test_obslog.py, test_media_types.py, test_correspondence.py): Image.new, save for PNG, WEBP, TIFF and JPEG, and ImageOps. Not affected.
  • No use of getsize, textsize, fromarray, ImageCms, ExifTags.IFD.Makernote, ICO, I mode, resampling constants or get_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.

@ChelseaKR
ChelseaKR merged commit d891b67 into main Oct 21, 2026
13 checks passed
@ChelseaKR
ChelseaKR deleted the deps/pillow-13 branch October 21, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant