What’s Vulnerable › Vulnerabilities
CVE-2022-22816: Out-of-bounds Read in Pillow
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.9% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-01-10 · updated 2026-06-17
- Weakness: CWE-125
Description
path_getbbox in path.c in Pillow before 9.0.0 has a buffer over-read during initialization of ImagePath.Path.
Affected products
- Debian Linux: 9.0, 10.0, 11.0
- python-pillow Pillow: before 9.0.0 — fixed in 9.0.0
- Pypi Pillow: before 9.0.0; 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 (+78) — fixed in 9.0.0
How to fix
Upgrade to a fixed version: python-pillow Pillow 9.0.0; Pypi Pillow 9.0.0. Check the vendor advisory for mitigations.
References
- https://github.com/python-pillow/Pillow/blob/c5d9223a8b5e9295d15b5a9b1ef1dae44c8499f3/src/path.c#L331
- https://lists.debian.org/debian-lts-announce/2022/01/msg00018.html
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#fixed-imagepath-path-array-handling
- https://security.gentoo.org/glsa/202211-10
- https://www.debian.org/security/2022/dsa-5053
- https://github.com/python-pillow/Pillow/blob/c5d9223a8b5e9295d15b5a9b1ef1dae44c8499f3/src/path.c#L331
- https://lists.debian.org/debian-lts-announce/2022/01/msg00018.html
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#fixed-imagepath-path-array-handling
- https://security.gentoo.org/glsa/202211-10
- https://www.debian.org/security/2022/dsa-5053
Get alerted when CVE-2022-22816 or the next vulnerability affects your stack