Skip to content

chore(deps): update dependency pillow to v12 [security] - autoclosed#14177

Closed
renovate-bot wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
renovate-bot:renovate/pypi-pillow-vulnerability
Closed

chore(deps): update dependency pillow to v12 [security] - autoclosed#14177
renovate-bot wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
renovate-bot:renovate/pypi-pillow-vulnerability

Conversation

@renovate-bot
Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
Pillow (changelog) ==10.4.0==12.2.0 age confidence
pillow (changelog) ==10.4.0==12.2.0 age confidence
pillow (changelog) ==10.3.0==12.2.0 age confidence
pillow (changelog) ==11.1.0==12.2.0 age confidence

Pillow affected by out-of-bounds write when loading PSD images

CVE-2026-25990 / GHSA-cfh3-3jmp-rvhc

More information

Details

Impact

An out-of-bounds write may be triggered when loading a specially crafted PSD image. Pillow >= 10.3.0 users are affected.

Patches

Pillow 12.1.1 will be released shortly with a fix for this.

Workarounds

Image.open() has a formats parameter that can be used to prevent PSD images from being opened.

References

Pillow 12.1.1 will add release notes at https://pillow.readthedocs.io/en/stable/releasenotes/index.html

Severity

  • CVSS Score: 8.6 / 10 (High)
  • Vector String: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


FITS GZIP decompression bomb in Pillow

CVE-2026-40192 / GHSA-whj4-6x5x-4v2j

More information

Details

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 Score: 8.7 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

python-pillow/Pillow (Pillow)

v12.2.0

Compare Source

https://pillow.readthedocs.io/en/stable/releasenotes/12.2.0.html

Documentation

Dependencies

Testing

Other changes

v12.1.1

Compare Source

v12.1.0

Compare Source

https://pillow.readthedocs.io/en/stable/releasenotes/12.1.0.html

Deprecations
Documentation
Dependencies
Testing
Type hints
Other changes

v12.0.0

Compare Source

https://pillow.readthedocs.io/en/stable/releasenotes/12.0.0.html

Removals

Deprecations

Documentation

Dependencies

Testing

Type hints

Other changes

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners May 13, 2026 00:04
@trusted-contributions-gcf trusted-contributions-gcf Bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels May 13, 2026
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: appengine Issues related to the App Engine Admin API API. api: people-and-planet-ai api: vision Issues related to the Cloud Vision API. labels May 13, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Pillow library to version 12.2.0 across multiple requirements.txt files. Feedback indicates that this version is incompatible with Python versions earlier than 3.10, which are currently supported in several project configurations. This change will lead to installation failures for users on Python 3.7, 3.8, or 3.9 unless environment markers are adjusted or support for these older versions is explicitly dropped.

numpy==1.26.4; python_version == '3.9'
numpy==1.24.4; python_version == '3.8'
pillow==10.4.0
pillow==12.2.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Pillow 12.2.0 requires Python 3.10 or higher. This file explicitly supports Python 3.8 and 3.9 (see lines 3-7 and 9). Updating to version 12.2.0 will break installation for users on these older Python versions. To maintain compatibility while addressing security, you should use environment markers to specify the latest compatible Pillow version for each Python version, or consider dropping support for Python < 3.10 in this sample.

Comment on lines +4 to +5
pillow==12.2.0; python_version < '3.8'
pillow==12.2.0; python_version >= '3.8'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Pillow 12.2.0 is incompatible with Python versions earlier than 3.10. The environment markers here target Python versions as old as < '3.8'. This change will cause installation failures for environments running Python 3.7, 3.8, or 3.9. If these Python versions must be supported, you should use conditional versioning (e.g., pinning Pillow 10.x for Python 3.8 and 11.x for Python 3.9).

Comment on lines +2 to +3
pillow==12.2.0; python_version < '3.8'
pillow==12.2.0; python_version >= '3.8'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Updating to Pillow 12.2.0 breaks compatibility with Python < 3.10. The markers used here suggest the project still intends to support Python 3.7 and 3.8, but Pillow 12.2.0 cannot be installed on those versions. This will lead to installation errors on older Python environments.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 13, 2026
@renovate-bot renovate-bot changed the title chore(deps): update dependency pillow to v12 [security] chore(deps): update dependency pillow to v12 [security] - autoclosed May 13, 2026
@renovate-bot renovate-bot deleted the renovate/pypi-pillow-vulnerability branch May 13, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: appengine Issues related to the App Engine Admin API API. api: people-and-planet-ai api: vision Issues related to the Cloud Vision API. owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants