{"id":"CVE-2022-22817","details":"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.","aliases":["BIT-pillow-2022-22817","GHSA-8vj2-vxx3-667w","PYSEC-2022-10"],"modified":"2026-05-18T05:53:40.121430296Z","published":"2022-01-07T00:00:00Z","related":["ALSA-2022:0643","SUSE-SU-2022:1729-1","SUSE-SU-2024:0290-1","openSUSE-SU-2024:11814-1","openSUSE-SU-2025:14645-1"],"database_specific":{"unresolved_ranges":[{"extracted_events":[{"fixed":"9.0.0"}],"source":"DESCRIPTION"}],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/22xxx/CVE-2022-22817.json","cna_assigner":"mitre"},"references":[{"type":"WEB","url":"https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval"},{"type":"WEB","url":"https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html#security"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/22xxx/CVE-2022-22817.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-22817"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202211-10"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5053"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2022/01/msg00018.html"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2024/03/msg00021.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/python-pillow/pillow","events":[{"introduced":"0"},{"fixed":"6deac9e3a23caffbfdd75c00d3f0a1cd36cdbd5d"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"9.0.1"}],"source":"CPE_FIELD","cpe":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*"}}],"versions":["9.0.0","8.4.0","8.3.0","8.2.0","8.1.0","8.0.0","7.2.0","7.1.0","7.0.0","6.2.0","6.1.0","6.0.0","5.4.0","5.3.0","5.2.0","5.1.0","5.0.0","4.3.0","4.2.0","4.1.0","4.0.0","4.0.0a","3.4.0","3.3.0","3.2.0","3.1.0","3.1.0-rc1","2.9.0","2.9.0.dev2","2.9.0.dev1","2.9.0.dev0","2.8.1","2.8.0","2.7.0","2.5.0","2.3.0","2.2.1","2.2.0","2.1.0","2.0.0","1.7.8","1.7.7","1.2","1.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-22817.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}