Repository navigation
Upgrade Pillow to 13.x (security) - #4
Merged
Merged
Conversation
pillow<11 pinned 10.4.0, which pip-audit flags with dozens of CVEs fixed in 12.x/13.0.0. Raise the range to >=13.0.0,<14.0.0. Pillow 13 needs Python 3.11+ (Dockerfile uses 3.11, CI 3.12). The only PIL use is qrcode's PNG/SVG/ASCII rendering; output is byte-identical before and after.
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.
What
requirements.txt:pillow>=10.4.0,<11.0.0->pillow>=13.0.0,<14.0.0. Pillow 10.4.0 is flagged by pip-audit with dozens of CVEs fixed in 12.x/13.0.0. No other pins exist (Dockerfile and CI install from requirements.txt).Code impact
Pillow is only reached through
qrcode(bot.py: SVG viaSvgPathImage, PNG viaPilImagesave(format="PNG"), ASCII viaprint_ascii). The bot makes no directPILimport. I read the Pillow 11, 12 and 13 release notes: removed APIs (PSFile, ImageMath.eval, Image._show, I-mode PNG save, etc.) are not used. Pillow 13 drops Python 3.10; Dockerfile uses 3.11 and CI 3.12, so both are supported. No code change needed.Evidence (venvs outside the repo; py3.12.13 and py3.11.15)
pip-audit -r requirements.txt: before, 69 lines mentioning Pillow; after,No known vulnerabilities found.-W error): sha256 of the SVG, decoded PNG pixels and ASCII output are identical for Pillow 10.4.0 (py3.12), 13.0.0 (py3.12) and 13.0.0 (py3.11). No warnings.python -m unittest discover -s tests -p "test_*.py", 1044 tests), run sequentially:test_rpc_methodspicking up a differentdeltachat-rpc-serverfrom my shell PATH, not the venv one. With the venv on PATH (PATH=<venv>/bin:$PATH) it passes, so the suite is green apart from this environment quirk.Not verified