Vulnerabilities / CVE-2022-22817

critical

CVE-2022-22817

python-pillow: PIL.ImageMath.eval allows evaluation of arbitrary expressions

Published Modified
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.3CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA, Bitnami. Rated lower by Red Hat (high), AlmaLinux (high), Amazon (high), Oracle (high), Rocky Linux (high), Ubuntu (medium).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
bitnami::Bitnami Vulnerability Databasepillow9.0.1
pip::GitHub Security Advisory pippillow9.0.1
alma 8python3-pillow, python3-pillow-devel, python3-pillow-doc and 1 more5.1.1-18.el8_5
alpine 3.15py3-pillow8.4.0-r3
alpine 3.16py3-pillow9.0.1-r0
alpine 3.17py3-pillow9.0.1-r0
alpine 3.18py3-pillow9.0.1-r0
alpine 3.19py3-pillow9.0.1-r0
alpine 3.20py3-pillow9.0.1-r0
alpine 3.21py3-pillow9.0.1-r0
alpine 3.22py3-pillow9.0.1-r0
alpine 3.23py3-pillow9.0.1-r0
Show all 61 entries from 33 sources
SourcePackageFixed in
bitnami::Bitnami Vulnerability Databasepillow9.0.1
pip::GitHub Security Advisory pippillow9.0.1
alma 8python3-pillow5.1.1-18.el8_5
alma 8python3-pillow-devel5.1.1-18.el8_5
alma 8python3-pillow-doc5.1.1-18.el8_5
alma 8python3-pillow-tk5.1.1-18.el8_5
alpine 3.15py3-pillow8.4.0-r3
alpine 3.16py3-pillow9.0.1-r0
alpine 3.17py3-pillow9.0.1-r0
alpine 3.18py3-pillow9.0.1-r0
alpine 3.19py3-pillow9.0.1-r0
alpine 3.20py3-pillow9.0.1-r0
alpine 3.21py3-pillow9.0.1-r0
alpine 3.22py3-pillow9.0.1-r0
alpine 3.23py3-pillow9.0.1-r0
alpine 3.24py3-pillow9.0.1-r0
alpine edgepy3-pillow9.0.1-r0
amazon linux 2python-pillow2.0.0-23.gitd1c6db8.amzn2.0.1
amazon linux 2python-pillow-debuginfo2.0.0-23.gitd1c6db8.amzn2.0.1
amazon linux 2python-pillow-devel2.0.0-23.gitd1c6db8.amzn2.0.1
amazon linux 2python-pillow-doc2.0.0-23.gitd1c6db8.amzn2.0.1
amazon linux 2python-pillow-sane2.0.0-23.gitd1c6db8.amzn2.0.1
amazon linux 2python-pillow-tk2.0.0-23.gitd1c6db8.amzn2.0.1
amazon linux 2022python-pillow-debuginfo9.0.1-6.amzn2022.0.2
amazon linux 2022python-pillow-debugsource9.0.1-6.amzn2022.0.2
amazon linux 2022python3-pillow9.0.1-6.amzn2022.0.2
amazon linux 2022python3-pillow-debuginfo9.0.1-6.amzn2022.0.2
amazon linux 2022python3-pillow-devel9.0.1-6.amzn2022.0.2
amazon linux 2022python3-pillow-tk9.0.1-6.amzn2022.0.2
amazon linux 2022python3-pillow-tk-debuginfo9.0.1-6.amzn2022.0.2
amazon linux 2023python-pillow-debuginfo9.0.1-6.amzn2023.0.3
amazon linux 2023python-pillow-debugsource9.0.1-6.amzn2023.0.3
amazon linux 2023python3-pillow9.0.1-6.amzn2023.0.3
amazon linux 2023python3-pillow-debuginfo9.0.1-6.amzn2023.0.3
amazon linux 2023python3-pillow-devel9.0.1-6.amzn2023.0.3
amazon linux 2023python3-pillow-tk9.0.1-6.amzn2023.0.3
amazon linux 2023python3-pillow-tk-debuginfo9.0.1-6.amzn2023.0.3
debian 10pillow5.4.1-2+deb10u5
debian 11pillow8.1.2+dfsg-0.3+deb11u1
debian 12pillow9.0.0-1
debian 13pillow9.0.0-1
debian 14pillow9.0.0-1
debian 9pillow4.0.0-4+deb9u4
echopillow9.0.0-1
Oracle Linux 7python-pillow2.0.0-23.gitd1c6db8.el7_9
Oracle Linux 7python-pillow-devel2.0.0-23.gitd1c6db8.el7_9
Oracle Linux 7python-pillow-doc2.0.0-23.gitd1c6db8.el7_9
Oracle Linux 7python-pillow-qt2.0.0-23.gitd1c6db8.el7_9
Oracle Linux 7python-pillow-sane2.0.0-23.gitd1c6db8.el7_9
Oracle Linux 7python-pillow-tk2.0.0-23.gitd1c6db8.el7_9
Oracle Linux 8python3-pillow5.1.1-18.el8_5
Oracle Linux 8python3-pillow-devel5.1.1-18.el8_5
Oracle Linux 8python3-pillow-doc5.1.1-18.el8_5
Oracle Linux 8python3-pillow-tk5.1.1-18.el8_5
rocky 8python3-pillow5.1.1-18.el8_5
ubuntu 18.04pillow5.1.0-1ubuntu0.8
ubuntu 18.04-ESMpillow5.1.0-1ubuntu0.8
ubuntu 20.04pillow7.0.0-4ubuntu0.6
ubuntu 20.04-ESMpillow7.0.0-4ubuntu0.6
ubuntu 21.04pillow8.1.2-1ubuntu0.2
ubuntu 21.10pillow8.1.2+dfsg-0.3ubuntu0.1

References

All 26 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.