Update dependency pillow to v12.2.0 [SECURITY]#249
Update dependency pillow to v12.2.0 [SECURITY]#249renovate[bot] wants to merge 1 commit intomainfrom
Conversation
| pandas==2.2.3 | ||
| matplotlib==3.10.8 | ||
| pillow==12.1.1 | ||
| pillow==12.2.0 |
There was a problem hiding this comment.
🔴 This PR fixes CVE-2026-40192 in template/requirements.txt by upgrading Pillow to 12.2.0, but chart_data_extractor/poetry.lock still pins Pillow at 12.1.1 (line 599), leaving that environment exposed to the same FITS decompression bomb vulnerability. Run poetry update pillow in chart_data_extractor/ and commit the updated lock file to complete the fix.
Extended reasoning...
Incomplete security fix: chart_data_extractor/poetry.lock still pins Pillow 12.1.1
This PR correctly updates template/requirements.txt to pillow==12.2.0 to patch CVE-2026-40192, which allows a specially crafted FITS image to trigger unbounded GZIP decompression, leading to OOM denial-of-service. However, the repository contains a second Pillow installation path that was not updated: chart_data_extractor/poetry.lock.
Affected code path: In chart_data_extractor/poetry.lock (lines 598–603), the lock file resolves Pillow to version 12.1.1 with optional = false and groups = ["main"]. This means Pillow is a non-optional, main-group dependency that is unconditionally installed by poetry install. Pillow arrives as a transitive dependency of matplotlib (which pyproject.toml lists as a direct dependency), and the lock file explicitly pins it to the vulnerable version.
Why existing checks don't catch it: The PR diff only touches template/requirements.txt. Poetry lock files are not automatically updated when a requirements.txt in a sibling directory is changed; each directory with a pyproject.toml/poetry.lock pair is managed independently. The CI workflow .github/workflows/charts_tests.yml runs poetry install in chart_data_extractor/, so every CI build for that component installs the vulnerable Pillow 12.1.1.
Impact: Any developer or CI pipeline that runs poetry install in chart_data_extractor/ will install Pillow 12.1.1 and remain exposed to CVE-2026-40192. While chart_data_extractor itself may not directly process FITS images, Pillow is present in the environment and could be exercised by upstream code, tests, or future changes.
Step-by-step proof:
- A developer clones the repo and runs
poetry installinchart_data_extractor/. - Poetry reads
chart_data_extractor/poetry.lockand installspillow==12.1.1(line 599) becauseoptional = falseand it is in themaingroup. - The installed Pillow is the vulnerable 12.1.1, not the patched 12.2.0.
- An attacker can supply a crafted FITS file to any code path that invokes
PIL.Image.open(), triggering unbounded memory consumption.
Fix: Run poetry update pillow (or poetry lock --no-update after manually editing pyproject.toml to constrain the version) inside chart_data_extractor/, then commit the updated poetry.lock as part of this PR.
codeCraft-Ritik
left a comment
There was a problem hiding this comment.
Great update! Upgrading Pillow to address CVE-2026-40192 is an important security fix.
Nice to see proactive handling of potential DoS vulnerabilities 👍
This PR contains the following updates:
==12.1.1→==12.2.0GitHub Vulnerability Alerts
CVE-2026-40192
Impact
Pillow did not limit the amount of GZIP-compressed data read when decoding a FITS image, making it vulnerable to decompression bomb attacks. A specially crafted FITS file could cause unbounded memory consumption, leading to denial of service (OOM crash or severe performance degradation).
Patches
The amount of data read is now limited to the necessary amount.
Fixed in Pillow 12.2.0 (PR #9521).
Workarounds
Avoid Pillow >= 10.3.0, < 12.2.0
Only open specific image formats, excluding FITS.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NRelease Notes
python-pillow/Pillow (pillow)
v12.2.0Compare Source
https://pillow.readthedocs.io/en/stable/releasenotes/12.2.0.html
Documentation
Dependencies
Testing
macos-15-inteltomacos-26-intel#9454 [@hugovk]Other changes
_getxyrefcount leaks #9487 [@hugovk]setimage()by always passing extents #9395 [@radarhere]self.decodetypo #9445 [@bysiber]Configuration
📅 Schedule: (in timezone UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.