Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Dec 29, 2023

Prevent environment keys matching the names of builtins and keys containing double underscores from being passed to ImageMath.eval(), by raising a ValueError.

@radarhere radarhere changed the title Restricted environment keys for ImageMath.eval Restricted environment keys for ImageMath.eval() Dec 29, 2023
@radarhere radarhere merged commit 02c6183 into python-pillow:main Dec 29, 2023
@radarhere radarhere deleted the imagemath_eval_keys branch December 29, 2023 23:24
aostrowski-hbn pushed a commit to aostrowski-hbn/pillow-simd that referenced this pull request Oct 8, 2024
Prevent environment keys matching the names of builtins and keys
containing double underscores from being passed to ImageMath.eval(),
by raising a ValueError.

This is a cherry-pick of python-pillow#7655 to fix
CVE-2023-50447 in Pillow-SIMD. Pillow only fixed it in 10.x, but
Pillow-SIMD doesn't have that release yet so it's vulnerable. This
commit solves that issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants