CVE-2022-22817
CRITICAL 9.8CVSS 3.1Arbitrary expression injection in Pillow
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.
- Published
- 10 Jan 2022
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-74
- Also known as
- BIT-pillow-2022-22817GHSA-8vj2-vxx3-667wPYSEC-2022-10
- Sources
- NVDJSONOSV GHSA-8vj2-vxx3-667wJSONOSV PYSEC-2022-10JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | python | pillowcpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* |
< 9.0.1 | 9.0.1 |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* |
= 11.0 | |
| OSV | PyPI | pillow | < 9.0.1 | 9.0.1 |
| OSV | PyPI | pillow | < 9.0.0 | 9.0.0 |
References
- https://lists.debian.org/debian-lts-announce/2022/01/msg00018.html · Mailing List, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2024/03/msg00021.html · WEB
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval · Release Notes, Vendor Advisory, WEB
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html#security · Release Notes, Vendor Advisory, WEB
- https://security.gentoo.org/glsa/202211-10 · Third Party Advisory, WEB
- https://www.debian.org/security/2022/dsa-5053 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-22817 · ADVISORY
- 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
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 10 Jan 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 10 Jan 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 12 Jan 2022)