cve.bz

CVE-2022-22817

9.8 criticalEPSS 3.6%Fix available

Critical (9.8). EPSS 3.6% estimated probability of exploitation activity in the next 30 days. Fixed in pillow 9.0.0, 9.0.1.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
3.6% (unchanged from 3.6% a week ago; 3.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 90th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2024-10-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-22817 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-22817?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-22817?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-22817 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python:pillowbefore 9.0.1
debian:debian_linux9.0
debian:debian_linux10.0
debian:debian_linux11.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-8vj2-vxx3-667wPyPIpillow<9.0.19.0.1
PYSEC-2022-10PyPIpillow<9.0.09.0.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9pillow4.0.0-4+deb9u4DLA-2893-1
Debian10pillow5.4.1-2+deb10u3DSA-5053-1
Debian10pillow5.4.1-2+deb10u5DLA-3768-1
Debian11pillow8.1.2+dfsg-0.3+deb11u1DSA-5053-1
Debian12, 13, 14pillow9.0.0-1DEBIAN-CVE-2022-22817
Ubuntu18.04:LTSpillow5.1.0-1ubuntu0.8UBUNTU-CVE-2022-22817 USN-5227-1 USN-5227-3
Ubuntu20.04:LTSpillow7.0.0-4ubuntu0.6UBUNTU-CVE-2022-22817 USN-5227-1 USN-5227-3
UbuntuPro:14.04:LTSpillow2.3.0-1ubuntu3.4+esm3USN-5227-2
UbuntuPro:16.04:LTSpillow3.1.2-0ubuntu1.6+esm1USN-5227-2
UbuntuPro:20.04:LTSpillow-python2no fix listedUBUNTU-CVE-2022-22817
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 morepython-pillow, python-pillow-qt, python-pillow-tk and 4 more0:2.0.0-23.gitd1c6db8.el7_9RHSA-2022:0609
Red Hatenterprise_linux:8::appstreampython-pillow, python3-pillow, python-pillow-debuginfo and 3 more0:5.1.1-18.el8_5RHSA-2022:0643
Red Hatenterprise_linux:8::crbpython3-pillow, python3-pillow-tk, python3-pillow-doc and 5 more0:5.1.1-18.el8_5RHSA-2022:0643
Red Hatrhel_e4s:8.1::appstreampython-pillow, python3-pillow, python-pillow-debuginfo and 3 more0:5.1.1-13.el8_1RHSA-2022:0669
Red Hatrhel_eus:8.2::appstreampython-pillow, python3-pillow, python-pillow-debuginfo and 3 more0:5.1.1-14.el8_2RHSA-2022:0667
Red Hatrhel_eus:8.4::appstreampython-pillow, python3-pillow, python-pillow-debuginfo and 3 more0:5.1.1-14.el8_4RHSA-2022:0665
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8python-Pillow4.2.1-3.26.1SUSE-SU-2024:0290-1
SUSEOpenStack Cloud 9ardana-barbican9.0+git.1644879908.8a641c1-3.13.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-barbican7.0.1~dev24-3.35.2SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-cinder13.0.10~dev24-3.38.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-designate7.0.2~dev2-3.35.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-glance17.0.1~dev30-3.33.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-heat11.0.4~dev4-3.35.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-horizon14.1.1~dev11-4.39.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-ironic11.1.5~dev18-4.33.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-keystone14.2.1~dev9-3.36.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-magnum7.2.1~dev1-4.35.1SUSE-SU-2022:1729-1
SUSEOpenStack Cloud 9venv-openstack-manila7.4.2~dev60-3.41.1SUSE-SU-2022:1729-1
21 more for SUSE in the JSON and on SUSE's page.
openSUSETumbleweedpython-Pillow11.1.0-1.1openSUSE-SU-2025:14645-1
openSUSETumbleweedpython-Pillow9.0.1-1.1openSUSE-SU-2024:11814-1
AlmaLinux8python3-pillow, python3-pillow-tk, python3-pillow-doc and 1 more5.1.1-18.el8_5ALSA-2022:0643
Rocky Linux8python-pillow0:5.1.1-18.el8_5RLSA-2022:0643
Alpinev3.15py3-pillow8.4.0-r3ALPINE-CVE-2022-22817
Alpinev3.16, v3.17, v3.18 and 6 morepy3-pillow9.0.1-r0ALPINE-CVE-2022-22817

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat Quay ships a vulnerable version of Pillow as a dependency of xhtml2pdf. The xhtml2pdf package is used in the invoice generation feature of Quay, however, the vulnerable ImageMath module is not used by xhtml2pdf. Therefore impact for Quay is rated Low.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7python-pillow-0:2.0.0-23.gitd1c6db8.el7_9Fixed 2022-02-22RHSA-2022:0609
Red Hat Enterprise Linux 8python-pillow-0:5.1.1-18.el8_5Fixed 2022-02-22RHSA-2022:0643
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionspython-pillow-0:5.1.1-13.el8_1Fixed 2022-02-24RHSA-2022:0669
Red Hat Enterprise Linux 8.2 Extended Update Supportpython-pillow-0:5.1.1-14.el8_2Fixed 2022-02-24RHSA-2022:0667
Red Hat Enterprise Linux 8.4 Extended Update Supportpython-pillow-0:5.1.1-14.el8_4Fixed 2022-02-24RHSA-2022:0665
Red Hat Quay 3quay/quay-rhel8Affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-22817.

References

Check your stackJSON