NetSight
critical9.8

CVE-2022-22817

Arbitrary expression injection in Pillow

Impact

`PIL.ImageMath.eval` in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method `ImageMath.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.

Affected packages

EcosystemPackageAffectedFixed in
pipPillow< 9.0.19.0.1

Affected products

VendorProductAffected versions
PythonPillow
before 9.0.1
DebianDebian Linux
Versions 9.0, 10.0, 11.0

Weakness classification

References