Skip to content

chore(deps): update dependency pillow to v12 [security]#14215

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

chore(deps): update dependency pillow to v12 [security]#14215
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 23, 2026 00:21
@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 23, 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 23, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 23, 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 dependency to version 12.2.0 across multiple requirements.txt files. The reviewer feedback consistently highlights that Pillow 12.2.0 requires Python 3.10 or later, which will cause installation failures in environments supporting older Python versions (3.7, 3.8, and 3.9) currently targeted by these files. It is recommended to use environment markers to provide compatible versions for older Python environments while allowing the upgrade for newer ones.

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 later. This file explicitly supports Python 3.8 and 3.9 (as seen in the numpy and scipy pins), so pinning to version 12.2.0 without environment markers will break the installation for those versions.

pillow==10.4.0; python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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 requires Python 3.10 or later. These environment markers explicitly target Python versions (like < '3.8') that are incompatible with Pillow 12, leading to installation failures. While version 10.4.0 (or 9.5.0 for 3.7) is vulnerable to the security issues mentioned in this PR, it is the last version compatible with those Python environments.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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

Pillow 12.2.0 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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

Pillow 12.2.0 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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

Pillow 12.2.0 requires Python 3.10 or later. These environment markers explicitly target Python versions that are incompatible with Pillow 12, leading to installation failures.

pillow==9.5.0; python_version < '3.8'
pillow==10.4.0; python_version >= '3.8' and python_version < '3.10'
pillow==12.2.0; python_version >= '3.10'

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