PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method.
"https://github.com/pypa/advisory-database/blob/main/vulns/pillow/PYSEC-2022-10.yaml"