# CVE-2022-22817: Arbitrary expression injection in Pillow

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.68%, higher than 89% of CVEs (2026-12-01)
- Published: 2022-01-07T00:00:00.000Z
- Modified: 2026-09-08T08:48:18.421Z
- Also known as: GHSA-8vj2-vxx3-667w, BIT-PILLOW-2022-22817, PYSEC-2022-10
- Weaknesses: CWE-74
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- pillow (PyPI): before 9.0.1; before 9.0.0
- python pillow: before 9.0.1
- debian debian_linux: 9.0; 10.0; 11.0
- pillow (Bitnami): before 9.0.1

## Every score

- CISA-ADP: 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`
- GitHub: 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`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: 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`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval> (advisory, release-notes, vendor-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2022/01/msg00018.html> (advisory, mailing-list, third-party-advisory, web)
- <https://www.debian.org/security/2022/dsa-5053> (advisory, third-party-advisory, vendor-advisory, web)
- <https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html#security> (advisory, release-notes, vendor-advisory, web)
- <https://security.gentoo.org/glsa/202211-10> (advisory, third-party-advisory, vendor-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2024/03/msg00021.html> (mailing-list, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-22817> (advisory, web)
- <https://github.com/python-pillow/Pillow/commit/8531b01d6cdf0b70f256f93092caa2a5d91afc11> (web)
- <https://github.com/advisories/GHSA-8vj2-vxx3-667w> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-10.yaml> (web)
- <https://github.com/python-pillow/Pillow> (package)

## Sources

- CVE List: [CVE-2022-22817](https://www.cve.org/CVERecord?id=CVE-2022-22817), CVE Terms of Use, modified 2024-10-15
- GitHub Advisory Database: [GHSA-8vj2-vxx3-667w](https://github.com/advisories/GHSA-8vj2-vxx3-667w), CC-BY-4.0, modified 2024-10-14
- NVD: [CVE-2022-22817](https://nvd.nist.gov/vuln/detail/CVE-2022-22817), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-10](https://osv.dev/vulnerability/PYSEC-2022-10), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-PILLOW-2022-22817](https://osv.dev/vulnerability/BIT-PILLOW-2022-22817), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-22817 · Whole record: https://cve.day/CVE-2022-22817.json · Rebuilt by cve.day 2026-11-25T22:58:09.156Z
