# CVE-2021-25288: Pillow Out-of-bounds Read vulnerability

- Severity: Critical 9.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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): 2.39%, higher than 84% of CVEs (2026-12-01)
- Published: 2021-06-02T15:13:28.000Z
- Modified: 2026-09-08T08:48:18.521Z
- Also known as: GHSA-rwv7-3v45-hg29, BIT-PILLOW-2021-25288, PYSEC-2021-138
- Weaknesses: CWE-125
- Assigned by: mitre

## Description

An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_gray_i.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- pillow (PyPI): from 2.4.0 before 8.2.0; before 8.2.0
- python pillow: before 8.2.0
- fedoraproject fedora: 33
- pillow (Bitnami): before 8.2.0

## Every score

- GitHub: CVSS:3.1 9.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- NVD: CVSS:2.0 6.4 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#cve-2021-25287-cve-2021-25288-fix-oob-read-in-jpeg2kdecode> (advisory, vendor-advisory, web)
- <https://github.com/python-pillow/Pillow/pull/5377#issuecomment-833821470> (advisory, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/> (vendor-advisory, web)
- <https://security.gentoo.org/glsa/202107-33> (advisory, third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-25288> (advisory, web)
- <https://github.com/python-pillow/Pillow/commit/3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87> (web)
- <https://github.com/advisories/GHSA-rwv7-3v45-hg29> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-138.yaml> (web)
- <https://github.com/python-pillow/Pillow> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/> (web)

## Sources

- CVE List: [CVE-2021-25288](https://www.cve.org/CVERecord?id=CVE-2021-25288), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-rwv7-3v45-hg29](https://github.com/advisories/GHSA-rwv7-3v45-hg29), CC-BY-4.0, modified 2024-10-09
- NVD: [CVE-2021-25288](https://nvd.nist.gov/vuln/detail/CVE-2021-25288), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-138](https://osv.dev/vulnerability/PYSEC-2021-138), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-PILLOW-2021-25288](https://osv.dev/vulnerability/BIT-PILLOW-2021-25288), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-25288 · Whole record: https://cve.day/CVE-2021-25288.json · Rebuilt by cve.day 2026-11-25T22:58:01.622Z
