[PR #4220] [CLOSED] [Other] Pillow 13.0.0 on Python 3.11+: 12.3.0's bundled OpenJPEG heap overflow is reachable from the vision path #4955

Closed
opened 2026-11-07 16:31:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4220
Author: @schmittcn
Created: 10/26/2026
Status: ❌ Closed

Base: main ← Head: pr/pillow-13


📝 Commits (1)

  • 617f8e1 Pillow 13.0.0 on Python 3.11+: 12.3.0 has open advisories, among them its bundled OpenJPEG's heap overflow reachable from the vision path's Image.open().load() (GHSA-78g4-xqwv-q3g8); Python 3.10 keeps 12.3.0 (Pillow 13 needs 3.11); the three terminal locks take only the new pillow wheel

📊 Changes

4 files changed (+8 additions, -7 deletions)

View changed files

📝 packaging/locks/runtime-darwin-arm64-cp312.txt (+2 -2)
📝 packaging/locks/runtime-linux-x86_64-cp312.txt (+2 -2)
📝 packaging/locks/runtime-windows-x86_64-cp312.txt (+2 -2)
📝 requirements.txt (+2 -1)

📄 Description

Problem and result

requirements.txt and the three terminal locks pin Pillow 12.3.0. Every Pillow wheel from 11.1.0 bundles an
OpenJPEG with a heap-buffer-overflow write reachable from Image.open().load()
(GHSA-78g4-xqwv-q3g8, high).
Strata reaches it from the vision path: Vision.normalize() (serve/server.py ~2798-2813) decodes any image that
is not JPEG/PNG/BMP/GIF with Pillow, so a JPEG 2000 image in a vision request reaches the affected decoder. 12.3.0
also has other open advisories (e.g. GHSA-5x8w-8jj5-q52h, critical, FlashPix; several high ones from 2026-10-20 on).
Pillow 13.0.0 (2026-10-16) fixes them; for OpenJPEG it carries the upstream fix as a patch (python-pillow/Pillow#10156),
so PIL.features.version("jpg_2000") still says 2.5.4.

Now: pillow==13.0.0 for Python 3.11+, in requirements.txt and the three packaging/locks/runtime-*-cp312.txt.

Raised in the review of a third-party Omarchy plugin that starts Strata (omacom/omarchy-plugin-marketplace#12853),
where it is already public, so not through private reporting.

Approach

  • Pillow 13 requires Python 3.11, and Strata supports 3.10. So one line per range, as numpy already has:
    pillow==13.0.0; python_version >= "3.11", pillow==12.3.0; python_version < "3.11". 3.10 stays on the affected
    12.3.0; there is no fixed Pillow for it. Dropping 3.10, or limiting normalize() to a format allowlist
    (Image.open(..., formats=[...]), the advisory's mitigation), would cover it; both are your call.
  • Locks: packaging/lock_wheels.py per target, then only the pillow block kept. A fresh run also moves
    platformdirs 4.13.0 -> 4.13.5 and, run on Linux, drops colorama from the Windows lock; neither belongs here.
    lock_wheels.py --check reports "DIFFERS" on unchanged main too (the platformdirs drift).
  • Each new hash matches PyPI's file: cp312 manylinux_2_27/2_28 x86_64, cp312 win_amd64, cp312 macosx_11_0_arm64.

Validation

Environment: RX 6900 XT 16 GB, Ryzen 9 5950X, 64 GB, Arch Linux (Omarchy), kernel 7.2.8; a source checkout's
.venv (Python 3.14) with pillow==13.0.0.

Passed: python -m serve.test_server 348 OK; python -m serve.test_exif_orientation OK; live: a vision model
(Ornith 1.5 35B-A3B IQ4_XS) answered a WebP picture (goes through Pillow) correctly.
Not run: a terminal archive build from the new locks; macOS, Windows; Python 3.10/3.11.

Limits

Python 3.10 installs remain on 12.3.0.

Release note

Pillow is now 13.0.0 on Python 3.11+ (fixes GHSA-78g4-xqwv-q3g8, an OpenJPEG heap overflow reachable through image input to vision models). Pillow 13 does not support Python 3.10, so 3.10 installs stay on 12.3.0 and remain affected; use Python 3.11+ (the packaged runtimes already ship 3.12).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4220 **Author:** [@schmittcn](https://github.com/schmittcn) **Created:** 10/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/pillow-13` --- ### 📝 Commits (1) - [`617f8e1`](https://github.com/Niko1221/Strata/commit/617f8e10ff809f4554436ca6dbcc248854f3736d) Pillow 13.0.0 on Python 3.11+: 12.3.0 has open advisories, among them its bundled OpenJPEG's heap overflow reachable from the vision path's Image.open().load() (GHSA-78g4-xqwv-q3g8); Python 3.10 keeps 12.3.0 (Pillow 13 needs 3.11); the three terminal locks take only the new pillow wheel ### 📊 Changes **4 files changed** (+8 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packaging/locks/runtime-darwin-arm64-cp312.txt` (+2 -2) 📝 `packaging/locks/runtime-linux-x86_64-cp312.txt` (+2 -2) 📝 `packaging/locks/runtime-windows-x86_64-cp312.txt` (+2 -2) 📝 `requirements.txt` (+2 -1) </details> ### 📄 Description ## Problem and result `requirements.txt` and the three terminal locks pin Pillow 12.3.0. Every Pillow wheel from 11.1.0 bundles an OpenJPEG with a heap-buffer-overflow write reachable from `Image.open().load()` ([GHSA-78g4-xqwv-q3g8](https://github.com/python-pillow/Pillow/security/advisories/GHSA-78g4-xqwv-q3g8), high). Strata reaches it from the vision path: `Vision.normalize()` (`serve/server.py` ~2798-2813) decodes any image that is not JPEG/PNG/BMP/GIF with Pillow, so a JPEG 2000 image in a vision request reaches the affected decoder. 12.3.0 also has other open advisories (e.g. GHSA-5x8w-8jj5-q52h, critical, FlashPix; several high ones from 2026-10-20 on). Pillow 13.0.0 (2026-10-16) fixes them; for OpenJPEG it carries the upstream fix as a patch (python-pillow/Pillow#10156), so `PIL.features.version("jpg_2000")` still says 2.5.4. Now: `pillow==13.0.0` for Python 3.11+, in `requirements.txt` and the three `packaging/locks/runtime-*-cp312.txt`. ## Related discussion Raised in the review of a third-party Omarchy plugin that starts Strata (omacom/omarchy-plugin-marketplace#12853), where it is already public, so not through private reporting. ## Approach - Pillow 13 requires Python 3.11, and Strata supports 3.10. So one line per range, as numpy already has: `pillow==13.0.0; python_version >= "3.11"`, `pillow==12.3.0; python_version < "3.11"`. 3.10 stays on the affected 12.3.0; there is no fixed Pillow for it. Dropping 3.10, or limiting `normalize()` to a format allowlist (`Image.open(..., formats=[...])`, the advisory's mitigation), would cover it; both are your call. - Locks: `packaging/lock_wheels.py` per target, then only the pillow block kept. A fresh run also moves `platformdirs` 4.13.0 -> 4.13.5 and, run on Linux, drops `colorama` from the Windows lock; neither belongs here. `lock_wheels.py --check` reports "DIFFERS" on unchanged `main` too (the platformdirs drift). - Each new hash matches PyPI's file: cp312 manylinux_2_27/2_28 x86_64, cp312 win_amd64, cp312 macosx_11_0_arm64. ## Validation Environment: RX 6900 XT 16 GB, Ryzen 9 5950X, 64 GB, Arch Linux (Omarchy), kernel 7.2.8; a source checkout's `.venv` (Python 3.14) with `pillow==13.0.0`. **Passed:** `python -m serve.test_server` 348 OK; `python -m serve.test_exif_orientation` OK; live: a vision model (Ornith 1.5 35B-A3B IQ4_XS) answered a WebP picture (goes through Pillow) correctly. **Not run:** a terminal archive build from the new locks; macOS, Windows; Python 3.10/3.11. ## Limits Python 3.10 installs remain on 12.3.0. ## Release note > Pillow is now 13.0.0 on Python 3.11+ (fixes GHSA-78g4-xqwv-q3g8, an OpenJPEG heap overflow reachable through image input to vision models). Pillow 13 does not support Python 3.10, so 3.10 installs stay on 12.3.0 and remain affected; use Python 3.11+ (the packaged runtimes already ship 3.12). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:31:35 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4955
No description provided.