Skip to content

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

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

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

Conversation

@renovate-bot
Copy link
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.1.1 age confidence
pillow (changelog) ==9.5.0==12.1.1 age confidence

GitHub Vulnerability Alerts

CVE-2026-25990

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


Release Notes

python-pillow/Pillow (pillow)

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

v11.3.0

Compare Source

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

Deprecations

Documentation

Dependencies

Testing

Type hints

Other changes


Configuration

📅 Schedule: 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 February 11, 2026 16:05
@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 Feb 11, 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: vision Issues related to the Cloud Vision API. labels Feb 11, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @renovate-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request systematically updates the pillow library to its latest version, 12.1.1, across various Python project configurations. This essential upgrade not only resolves a critical security vulnerability related to image processing but also integrates a wide array of functional enhancements, performance improvements, and maintenance updates accumulated over several Pillow releases.

Highlights

  • Dependency Update: Updated the pillow dependency to version 12.1.1 across multiple requirements.txt files.
  • Security Fix: Addressed the security vulnerability CVE-2026-25990, which involved an out-of-bounds write when processing specially crafted PSD images.
  • Feature and Improvement Integration: Incorporated numerous features, bug fixes, and improvements from Pillow versions 11.3.0, 12.0.0, 12.1.0, and 12.1.1, including deprecations, documentation enhancements, and internal dependency updates.
Changelog
  • appengine/flexible/scipy/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • appengine/flexible_python37_and_earlier/scipy/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/embeddings/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/evaluation/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/extensions/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/image_generation/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/model_garden/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/model_tuning/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/prompts/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • generative_ai/reasoning_engine/requirements.txt
    • Updated pillow from 10.4.0 to 12.1.1.
  • vision/snippets/crop_hints/requirements.txt
    • Updated pillow from 9.5.0 (for Python < 3.8) and 10.4.0 (for Python >= 3.8) to 12.1.1.
  • vision/snippets/document_text/requirements.txt
    • Updated pillow from 9.5.0 (for Python < 3.8) and 10.4.0 (for Python >= 3.8) to 12.1.1.
  • vision/snippets/face_detection/requirements.txt
    • Updated pillow from 9.5.0 (for Python < 3.8) and 10.4.0 (for Python >= 3.8) to 12.1.1.
Activity
  • This pull request was automatically generated by Renovate Bot.
  • Automerge is currently disabled, requiring manual merging.
  • Rebasing is configured to happen only if explicitly requested by checking the rebase/retry box.
  • No human comments or reviews have been recorded on this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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.1.1 to address a security vulnerability. However, this is a major version upgrade which drops support for Python 3.9. As many of the projects in this repository still support Python 3.9, this upgrade will cause build failures. I have left critical comments on all affected requirements.txt files detailing the issue and suggesting potential solutions. Please carefully review these comments and decide on the appropriate course of action for handling Python 3.9 compatibility.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by other dependencies in this file, e.g., numpy==1.26.4; python_version == '3.9'). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

numpy==2.2.4; python_version == '3.8'
numpy==2.2.4; python_version == '3.7'
pillow==10.4.0
pillow==12.1.1
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by other dependencies in this file, e.g., numpy==2.2.4; python_version == '3.9'). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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

Choose a reason for hiding this comment

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

critical

This update to Pillow v12 introduces a breaking change. Pillow v12.0.0 and later have dropped support for Python 3.9. This project appears to support Python 3.9 (as indicated by the python_version >= '3.8' marker). Upgrading to pillow==12.1.1 will cause build failures for Python 3.9 environments.

To resolve this, you could:

  1. Drop support for Python 3.9 in this project.
  2. Use version pinning to install a different version of Pillow for Python 3.9. For example:
    pillow<12; python_version == '3.9'
    pillow==12.1.1; python_version > '3.9'
    
    However, this would mean not applying the security fix for Python 3.9 environments, as the fix is in v12.1.1. Please evaluate the security risk and decide on the best course of action.

Also, note that the two lines for pillow can be simplified into a single line if the same version is used for all Python versions.

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: 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