Skip to content

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

Merged
ChelseaKR merged 1 commit into
mainfrom
deps/pillow-13
Oct 21, 2026
Merged

ChelseaKR merged 1 commit into
mainfrom
deps/pillow-13

Conversation

@ChelseaKR

Copy link
Copy Markdown
Owner

Summary

Upgrades the locked 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 (new wheel and sdist hashes). Produced with uv lock --upgrade-package pillow. No other package moved.
  • No change to pyproject.toml, the CHANGELOG, the version, or any release or publish workflow. Recent dependency bumps that change just the lock in this repo (for example virtualenv in build(deps): bump virtualenv for security advisories #86) touched uv.lock alone, so this follows the same convention.

Why

Pillow is not a direct dependency and nothing under src, tests or scripts imports PIL. It arrives through pdfplumber 0.11.10, which declares Pillow>=12.2.0 (no upper bound), so 13.0.0 is allowed without any constraint change. Pillow 13.0.0 (released 2026-10-16) carries the fixes for these advisories. Its release notes list many decoder and encoder security fixes; they are at https://pillow.readthedocs.io/en/stable/releasenotes/13.0.0.html and use their own CVE and GHSA identifiers, which I could not map one to one to the eight identifiers above.

Risk assessment

Verdict: safe.

  • The published package declares pdfplumber>=0.11.4 and no pillow range, so end users get whatever pillow pdfplumber resolves. This change affects the committed lock (CI, dev and the dist-check environment) and does not change what PyPI users install.
  • Pillow 13.0.0 removals and behavior changes (https://pillow.readthedocs.io/en/stable/releasenotes/13.0.0.html and https://pillow.readthedocs.io/en/stable/deprecations.html): Python 3.10 support dropped (this repo requires Python 3.12 or newer), saving I mode images as PNG removed, Image.fromarray mode parameter restricted, Image._show, ImageCms product_name and product_info, and ExifTags.IFD.Makernote removed, ImageColor.getcolor premultiplied alpha change, duplicate TIFF tags keep the earliest value, small ICO saves. None of these is called by this repo, and the code does not use pdfplumber image rendering (to_image), which is the path where pdfplumber calls pillow.
  • Residual gap: 67 tests are skipped because the real published PDFs are not fetched in a clean checkout (they ask for make fetch). Text extraction through pdfplumber on those PDFs was therefore not exercised against pillow 13 here, although pdfplumber's text path does not use pillow.

Verification

  • Gate: make verify (uv sync --locked, ruff check, ruff format --check, mypy, pytest with the coverage floor). Result: exit 0, "All checks passed!", "95 files already formatted", "Success: no issues found in 33 source files", "683 passed, 67 skipped", "Required test coverage of 85% reached. Total coverage: 93.82%". The whole output was read and contains no "FAILED" or error lines. The environment imported PIL 13.0.0.
  • Dependency audit, run as CI does (uv export --locked --format requirements-txt --no-emit-project -o requirements.audit.txt, then uv run --with 'pip-audit==2.9.0' pip-audit --strict -r requirements.audit.txt): "No known vulnerabilities found".

Prepared with AI assistance; reviewed before submission.

@ChelseaKR
ChelseaKR merged commit 54ab27d into main Oct 21, 2026
4 checks passed
@ChelseaKR
ChelseaKR deleted the deps/pillow-13 branch October 21, 2026 03:24
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