CVE-2022-22817
python-pillow: PIL.ImageMath.eval allows evaluation of arbitrary expressions
Overview
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.
Source: OX vulnerability database
Severity
9.8 · CRITICAL
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected packages · 2
Operating systems · 27 fixes
Oracle Linux 2 releases · 2 packages
fixed 2
python-pillow
python3-pillow
| Release | Package | Fixed in |
|---|---|---|
| 7 | python-pillow +5 | 2.0.0-23.gitd1c6db8.el7_9 |
| 8 | python3-pillow +3 | 5.1.1-18.el8_5 |
Red Hat 2 releases · 2 packages
fixed 5
python-pillow
python3-pillow
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | python-pillow +5 | 0:2.0.0-23.gitd1c6db8.el7_9 | RHSA-2022:0609 |
| 8 | python3-pillow | 0:5.1.1-13.el8_1 | RHSA-2022:0669 |
| 8 | python3-pillow | 0:5.1.1-14.el8_2 | RHSA-2022:0667 |
| 8 | python3-pillow | 0:5.1.1-14.el8_4 | RHSA-2022:0665 |
| 8 | python3-pillow +3 | 0:5.1.1-18.el8_5 | RHSA-2022:0643 |
alma 1 release · 1 package
fixed 1
python3-pillow
| Release | Package | Fixed in |
|---|---|---|
| 8 | python3-pillow +3 | 5.1.1-18.el8_5 |
alpine 4 releases · 1 package
fixed 4
py3-pillow
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | py3-pillow | 9.0.1-r0 |
| 3.23 | py3-pillow | 9.0.1-r0 |
| 3.24 | py3-pillow | 9.0.1-r0 |
| edge | py3-pillow | 9.0.1-r0 |
amazon linux 1 release · 1 package
fixed 1
python-pillow-debuginfo
| Release | Package | Fixed in |
|---|---|---|
| 2023 | python-pillow-debuginfo +6 | 9.0.1-6.amzn2023.0.3 |
debian 6 releases · 1 package
fixed 6
pillow
| Release | Package | Fixed in |
|---|---|---|
| 10 | pillow | 5.4.1-2+deb10u5 |
| 11 | pillow | 8.1.2+dfsg-0.3+deb11u1 |
| 12 | pillow | 9.0.0-1 |
| 13 | pillow | 9.0.0-1 |
| 14 | pillow | 9.0.0-1 |
| 9 | pillow | 4.0.0-4+deb9u4 |
echo 1 release · 1 package
fixed 1
pillow
| Release | Package | Fixed in |
|---|---|---|
| pillow | 9.0.0-1 |
openSUSE 1 release · 2 packages
fixed 2
python311-pillow
python310-pillow
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | python311-pillow +5 | 11.1.0-1.1 | openSUSE-SU-2025:14645-1 |
| Tumbleweed | python310-pillow +5 | 9.0.1-1.1 | openSUSE-SU-2024:11814-1 |
rocky 1 release · 1 package
fixed 1
python3-pillow
| Release | Package | Fixed in |
|---|---|---|
| 8 | python3-pillow | 5.1.1-18.el8_5 |
ubuntu 4 releases · 1 package
fixed 4
pillow
| Release | Package | Fixed in |
|---|---|---|
| 18.04 | pillow | 5.1.0-1ubuntu0.8 |
| 18.04-ESM | pillow | 5.1.0-1ubuntu0.8 |
| 20.04 | pillow | 7.0.0-4ubuntu0.6 |
| 20.04-ESM | pillow | 7.0.0-4ubuntu0.6 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-22817
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2042522
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2042527
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22815
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22816
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22817
- errata.almalinux.org https://errata.almalinux.org/8/ALSA-2022-0643.html
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2022:0643
- github.com https://github.com/advisories/GHSA-8vj2-vxx3-667w
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-10.yaml
Show all 26 references
- github.com https://github.com/python-pillow/Pillow
- github.com https://github.com/python-pillow/Pillow/commit/8531b01d6cdf0b70f256f93092caa2a5d91afc11
- linux.oracle.com https://linux.oracle.com/cve/CVE-2022-22817.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2022-0643.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2022/01/msg00018.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2024/03/msg00021.html
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2022-22817
- pillow.readthedocs.io https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#fixed-imagepath-path-array-handling
- pillow.readthedocs.io https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval
- pillow.readthedocs.io https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html#security
- security.gentoo.org https://security.gentoo.org/glsa/202211-10
- ubuntu.com https://ubuntu.com/security/notices/USN-5227-1
- ubuntu.com https://ubuntu.com/security/notices/USN-5227-2
- ubuntu.com https://ubuntu.com/security/notices/USN-5227-3
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2022-22817
- www.debian.org https://www.debian.org/security/2022/dsa-5053
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.