PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions…
Priority MEDIUM 55CWE-74Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 12 fixed, 1 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.03584 89th percentileScored 2026-11-07
Fix Partial pillow (PyPI): 9.0.1Red Hat: 5 advisoriesRed Hat: 12 fixed, 1 without a fix
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | pillow (PyPI) | before 9.0.1 | 9.0.1 | Patch available | GHSA-8vj2-vxx3-667w |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- pillow (PyPI) Vendor— Affected before 9.0.1 Fixed in 9.0.1 Patch available GHSA-8vj2-vxx3-667w
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* | before 9.0.1 | Vulnerable | python-pillow |
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | 11.0 | Vulnerable | Debian |
- cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* Versions before 9.0.1 Vulnerable ·python-pillow
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
Remediation
- Fix · GHSA-8vj2-vxx3-667w pillow (PyPI) Fixed in 9.0.1 Advisory →
Red Hat 5 advisories
- RHSA-2022:0665 Released 2022-02-24 · Red Hat rating Importantpython-pillow security update
- Red Hat Enterprise Linux AppStream EUS (v.8.4) python-pillow-5.1.1-14.el8_4, python3-pillow-5.1.1-14.el8_4
- RHSA-2022:0667 Released 2022-02-24 · Red Hat rating Importantpython-pillow security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) python-pillow-5.1.1-14.el8_2, python3-pillow-5.1.1-14.el8_2
- RHSA-2022:0669 Released 2022-02-24 · Red Hat rating Importantpython-pillow security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.1) python-pillow-5.1.1-13.el8_1, python3-pillow-5.1.1-13.el8_1
Show 2 more Red Hat advisories
- RHSA-2022:0643 Released 2022-02-22 · Red Hat rating Importantpython-pillow security update
- Red Hat CodeReady Linux Builder (v. 8) python3-pillow-5.1.1-18.el8_5, python3-pillow-devel-5.1.1-18.el8_5, python3-pillow-doc-5.1.1-18.el8_5 +1
- Red Hat Enterprise Linux AppStream (v. 8) python-pillow-5.1.1-18.el8_5, python3-pillow-5.1.1-18.el8_5
- RHSA-2022:0609 Released 2022-02-22 · Red Hat rating Importantpython-pillow security update
- Red Hat Enterprise Linux Client (v. 7) python-pillow-2.0.0-23.gitd1c6db8.el7_9
- Red Hat Enterprise Linux Client Optional (v. 7) python-pillow-2.0.0-23.gitd1c6db8.el7_9, python-pillow-devel-2.0.0-23.gitd1c6db8.el7_9, python-pillow-doc-2.0.0-23.gitd1c6db8.el7_9 +3
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) python-pillow-2.0.0-23.gitd1c6db8.el7_9, python-pillow-devel-2.0.0-23.gitd1c6db8.el7_9, python-pillow-doc-2.0.0-23.gitd1c6db8.el7_9 +3
- Red Hat Enterprise Linux Server (v. 7) python-pillow-2.0.0-23.gitd1c6db8.el7_9
- Red Hat Enterprise Linux Server Optional (v. 7) python-pillow-2.0.0-23.gitd1c6db8.el7_9, python-pillow-2.0.0-23.gitd1c6db8.el7_9.ppc, python-pillow-devel-2.0.0-23.gitd1c6db8.el7_9 +5
- Red Hat Enterprise Linux Workstation (v. 7) python-pillow-2.0.0-23.gitd1c6db8.el7_9
- Red Hat Enterprise Linux Workstation Optional (v. 7) python-pillow-2.0.0-23.gitd1c6db8.el7_9, python-pillow-devel-2.0.0-23.gitd1c6db8.el7_9, python-pillow-doc-2.0.0-23.gitd1c6db8.el7_9 +3
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Quay 3 | Affected | No fix yet |
| Red Hat CodeReady Linux Builder (v. 8) | Fixed | RHSA-2022:0643 |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2022:0643 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.1) | Fixed | RHSA-2022:0669 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.2) | Fixed | RHSA-2022:0667 |
| Red Hat Enterprise Linux AppStream EUS (v.8.4) | Fixed | RHSA-2022:0665 |
| Red Hat Enterprise Linux Client (v. 7) | Fixed | RHSA-2022:0609 |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2022:0609 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2022:0609 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2022:0609 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2022:0609 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2022:0609 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2022:0609 |
Timeline
- 2026-10-02 Threatist record created from CVE-2022-22817
- 2026-10-03 Alias added: GHSA-8vj2-vxx3-667w
References
Advisory 7
- 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
- DSA-5053
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html#security
- GLSA-202211-10
- https://nvd.nist.gov/vuln/detail/CVE-2022-22817
- https://github.com/advisories/GHSA-8vj2-vxx3-667w
Sources
- CVE-2022-22817 · CVE Program
- CVE-2022-22817 · NVD
- FIRST EPSS
- GHSA-8vj2-vxx3-667w · GitHub Advisory Database · CC BY 4.0
- CVE-2022-22817 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences