First published: Fri Jan 07 2022(Updated: )
`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.
Credit: cve@mitre.org cve@mitre.org cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
Python Pillow | <9.0.1 | |
Debian Debian Linux | =9.0 | |
Debian Debian Linux | =10.0 | |
Debian Debian Linux | =11.0 | |
debian/pillow | 5.4.1-2+deb10u3 8.1.2+dfsg-0.3+deb11u1 9.4.0-1.1 10.1.0-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2022-22817 is a vulnerability in PIL.ImageMath.eval in Pillow before 9.0.0 that allows evaluation of arbitrary expressions, including ones that use the Python exec method.
The severity of CVE-2022-22817 is critical with a CVSS score of 9.8.
Pillow versions before 9.0.0 and certain versions of Debian Debian Linux (9.0, 10.0, and 11.0) are affected by CVE-2022-22817.
To fix CVE-2022-22817, update Pillow to version 9.0.1 or later, as well as any affected versions of Debian Debian Linux.
You can find more information about CVE-2022-22817 on the NIST National Vulnerability Database (NVD) website and the official Pillow documentation.