Arbitrary expression injection in Pillow
Critical severity
GitHub Reviewed
Published
Jan 12, 2022
to the GitHub Advisory Database
•
Updated Oct 11, 2024
Description
Published by the National Vulnerability Database
Jan 10, 2022
Reviewed
Jan 11, 2022
Published to the GitHub Advisory Database
Jan 12, 2022
Last updated
Oct 11, 2024
PIL.ImageMath.eval
in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec methodImageMath.eval("exec(exit())")
.While Pillow 9.0.0 restricted top-level builtins available to PIL.ImageMath.eval(), it did not prevent builtins available to lambda expressions. These are now also restricted in 9.0.1.
References