mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[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
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4955
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
617f8e1Pillow 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.txtand the three terminal locks pin Pillow 12.3.0. Every Pillow wheel from 11.1.0 bundles anOpenJPEG 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 thatis 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.0for Python 3.11+, inrequirements.txtand the threepackaging/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.0.0; python_version >= "3.11",pillow==12.3.0; python_version < "3.11". 3.10 stays on the affected12.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.packaging/lock_wheels.pyper target, then only the pillow block kept. A fresh run also movesplatformdirs4.13.0 -> 4.13.5 and, run on Linux, dropscoloramafrom the Windows lock; neither belongs here.lock_wheels.py --checkreports "DIFFERS" on unchangedmaintoo (the platformdirs drift).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) withpillow==13.0.0.Passed:
python -m serve.test_server348 OK;python -m serve.test_exif_orientationOK; 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.