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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | pillow | 9.0.0-1 | — |
| Debian 13 | pillow | 9.0.0-1 | — |
| Debian 12 | pillow | 9.0.0-1 | — |
| Debian 11 | pillow | 8.1.2+dfsg-0.3+deb11u1 | DSA-5053-1 |
| Debian 10 | pillow | 5.4.1-2+deb10u3 | DSA-5053-1, DLA-3768-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 9 | pillow | 4.0.0-4+deb9u4 | DLA-2893-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | pillow | 7.0.0-4ubuntu0.6 | USN-5227-3, USN-5227-1 |
| Ubuntu 18.04 LTS | pillow | 5.1.0-1ubuntu0.8 | USN-5227-3, USN-5227-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | pillow-python2 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | pillow | 3.1.2-0ubuntu1.6+esm1 | USN-5227-2 |
| Ubuntu Pro 14.04 LTS | pillow | 2.3.0-1ubuntu3.4+esm3 | USN-5227-2 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | python-pillow +4 | 5.1.1-18.el8_5 | RHSA-2022:0643 |
| RHEL 7 | python-pillow +5 | 2.0.0-23.gitd1c6db8.el7_9 | RHSA-2022:0609 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8.4 EUS | python-pillow +1 | 5.1.1-14.el8_4 | RHSA-2022:0665 |
| RHEL 8.2 EUS | python-pillow +1 | 5.1.1-14.el8_2 | RHSA-2022:0667 |
| RHEL 8.1 E4S | python-pillow +1 | 5.1.1-13.el8_1 | RHSA-2022:0669 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 8 | python3-pillow +3 | 5.1.1-18.el8_5 | ALSA-2022:0643 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | python-pillow | 5.1.1-18.el8_5 | RLSA-2022:0643 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE OpenStack Cloud Crowbar 9 | grafana | 6.7.4-3.26.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-barbican | 7.0.1~dev24-3.14.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-cinder | 13.0.10~dev24-3.34.2 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-heat-gbp | 14.0.1~dev4-3.9.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-horizon-plugin-gbp-ui | 14.0.1~dev3-3.9.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-ironic | 11.1.5~dev18-3.28.2 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-keystone | 14.2.1~dev9-3.28.2 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-neutron | 13.0.8~dev206-3.40.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | openstack-neutron-gbp | 14.0.1~dev33-3.31.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | python-Pillow | 5.2.0-3.17.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | python-XStatic-jquery-ui | 1.13.0.1-4.3.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | python-lxml | 4.2.4-3.3.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | release-notes-suse-openstack-cloud | 9.20220413-3.30.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 9 | rubygem-sinatra | 1.4.6-4.3.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud Crowbar 8 | python-Pillow | 4.2.1-3.26.1 | SUSE-SU-2024:0290-1 |
| SUSE OpenStack Cloud 9 | ardana-barbican | 9.0+git.1644879908.8a641c1-3.13.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | grafana | 6.7.4-3.26.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-barbican | 7.0.1~dev24-3.14.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-cinder | 13.0.10~dev24-3.34.2 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-heat-gbp | 14.0.1~dev4-3.9.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-horizon-plugin-gbp-ui | 14.0.1~dev3-3.9.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-ironic | 11.1.5~dev18-3.28.2 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-keystone | 14.2.1~dev9-3.28.2 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-neutron | 13.0.8~dev206-3.40.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | openstack-neutron-gbp | 14.0.1~dev33-3.31.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | python-Pillow | 5.2.0-3.17.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | python-XStatic-jquery-ui | 1.13.0.1-4.3.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | python-lxml | 4.2.4-3.3.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | release-notes-suse-openstack-cloud | 9.20220413-3.30.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-barbican | 7.0.1~dev24-3.35.2 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-cinder | 13.0.10~dev24-3.38.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-designate | 7.0.2~dev2-3.35.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-glance | 17.0.1~dev30-3.33.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-heat | 11.0.4~dev4-3.35.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-horizon | 14.1.1~dev11-4.39.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-ironic | 11.1.5~dev18-4.33.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-keystone | 14.2.1~dev9-3.36.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-magnum | 7.2.1~dev1-4.35.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-manila | 7.4.2~dev60-3.41.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-monasca | 2.7.1~dev10-3.37.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-monasca-ceilometer | 1.8.2~dev3-3.35.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-neutron | 13.0.8~dev206-6.39.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-nova | 18.3.1~dev91-3.39.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-octavia | 3.2.3~dev7-4.35.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-sahara | 9.0.2~dev15-3.35.1 | SUSE-SU-2022:1729-1 |
| SUSE OpenStack Cloud 9 | venv-openstack-swift | 2.19.2~dev48-2.30.1 | SUSE-SU-2022:1729-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE OpenStack Cloud 8 | python-Pillow | 4.2.1-3.26.1 | SUSE-SU-2024:0290-1 |
| SUSE HPE Helion OpenStack 8 | python-Pillow | 4.2.1-3.26.1 | SUSE-SU-2024:0290-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-Pillow | 9.0.1-1.1 | openSUSE-SU-2025:14645-1, openSUSE-SU-2024:11814-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.23 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.22 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.21 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.20 | py3-pillow | 9.0.1-r0 | — |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.18 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.17 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.16 | py3-pillow | 9.0.1-r0 | — |
| Alpine v3.15 | py3-pillow | 8.4.0-r3 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | python3-pillow +2 | 9.0.1-6.amzn2023.0.3 | ALAS2023-2023-057 |
| Amazon Linux 2 | python-pillow +4 | 2.0.0-23.gitd1c6db8.amzn2.0.1 | ALAS2-2022-1786 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | python3-pillow +3 | 5.1.1-18.el8_5 | ELSA-2022-0643 |
| Oracle Linux 7 | python-pillow +5 | 2.0.0-23.gitd1c6db8.el7_9 | ELSA-2022-0609 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | pillow | < 9.0.1 | 9.0.1 | GHSA-8vj2-vxx3-667w |
| PyPI | pillow | < 9.0.0 | 9.0.0 | PYSEC-2022-10 |
Advisories 25
- ALSA-2022:0643 Important: python-pillow security update AlmaLinux Security Advisories · Oct 29, 2026
- WID-SEC-2022-0432 Xerox FreeFlow Print Server: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 11, 2026
- WID-SEC-2022-0302 Xerox FreeFlow Print Server: Mehrere Schwachstellen ermöglichen Ausführen von beliebigem Programmcode mit Administratorrechten BSI CERT-Bund (WID) · Oct 11, 2026
- USN-5227-2 pillow vulnerabilities Ubuntu Security Notices (USN) · Jun 29, 2026
- RHSA-2022:0669 Red Hat Security Advisory: python-pillow security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2022:0667 Red Hat Security Advisory: python-pillow security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2022:0665 Red Hat Security Advisory: python-pillow security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2022:0643 Red Hat Security Advisory: python-pillow security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2022:0609 Red Hat Security Advisory: python-pillow security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- USN-5227-1 pillow vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- USN-5227-3 pillow vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- DSA-5053-1 pillow - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-2893-1 pillow - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3768-1 pillow - security update Debian Security (DSA / DLA) · Mar 9, 2026
- RLSA-2022:0643 Important: python-pillow security update Rocky Linux Security Advisories · Feb 4, 2026
- openSUSE-SU-2024:11814-1 python310-Pillow-9.0.1-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:1729-1 Security update for ardana-barbican, grafana, openstack-barbican, openstack-cinder, openstack-heat-gbp, openstack-horizon-plugin-gbp-ui, openstack-ironic, openstack-keystone, openstack-neutron-gbp, python-lxml, release-notes-suse-openstack-cloud SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0290-1 Security update for python-Pillow SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2025:14645-1 python311-Pillow-11.1.0-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2-2022-1786 Important: python-pillow security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Sep 23, 2025
- WID-SEC-2025-0100 Red Hat Enterprise Linux: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 15, 2025
- WID-SEC-2024-1248 Xerox FreeFlow Print Server: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 21, 2024
- ALAS2023-2023-057 Important: python-pillow security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 22, 2023
- ELSA-2022-0643 Important: python-pillow security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Feb 23, 2022
- ELSA-2022-0609 Important: python-pillow security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Feb 23, 2022
References
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval
- [debian-lts-announce] 20220123 [SECURITY] [DLA 2893-1] pillow security update mailing-list
- DSA-5053 vendor-advisory
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html#security
- GLSA-202211-10 vendor-advisory
- [debian-lts-announce] 20240322 [SECURITY] [DLA 3768-1] pillow security update mailing-list