PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method. A lambda expression could also be used.
{ "availability": "No subscription required", "ubuntu_priority": "medium", "binaries": [ { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python-pil" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python-pil-dbg" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python-pil-doc" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python-pil.imagetk" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python-pil.imagetk-dbg" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python3-pil" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python3-pil-dbg" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python3-pil.imagetk" }, { "binary_version": "5.1.0-1ubuntu0.8", "binary_name": "python3-pil.imagetk-dbg" } ] }
{ "availability": "No subscription required", "ubuntu_priority": "medium", "binaries": [ { "binary_version": "7.0.0-4ubuntu0.6", "binary_name": "python-pil-doc" }, { "binary_version": "7.0.0-4ubuntu0.6", "binary_name": "python3-pil" }, { "binary_version": "7.0.0-4ubuntu0.6", "binary_name": "python3-pil-dbg" }, { "binary_version": "7.0.0-4ubuntu0.6", "binary_name": "python3-pil.imagetk" }, { "binary_version": "7.0.0-4ubuntu0.6", "binary_name": "python3-pil.imagetk-dbg" } ] }
{ "availability": "No subscription required", "ubuntu_priority": "medium", "binaries": [ { "binary_version": "9.0.1-1build1", "binary_name": "python-pil-doc" }, { "binary_version": "9.0.1-1build1", "binary_name": "python3-pil" }, { "binary_version": "9.0.1-1build1", "binary_name": "python3-pil-dbgsym" }, { "binary_version": "9.0.1-1build1", "binary_name": "python3-pil.imagetk" }, { "binary_version": "9.0.1-1build1", "binary_name": "python3-pil.imagetk-dbgsym" } ] }