# CVE-2021-25287

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.1 (NVD); no exploitation reported by the 5 checked sources; EPSS 2% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2021-06-02 · Modified: 2024-08-03
- Aliases: ALPINE-CVE-2021-25287, GHSA-77gc-v2xv-rvvh, BIT-pillow-2021-25287, PYSEC-2021-137, UBUNTU-CVE-2021-25287, DEBIAN-CVE-2021-25287
- Record: https://cvemate.com/vulnerability/CVE-2021-25287 · JSON: https://cvemate.com/vulnerability/CVE-2021-25287/json

## Description

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

## Signals

- CVSS: 9.1 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- EPSS: 2.388%, percentile 84.49%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine py3-pillow (Alpine Linux): \< 8.2.0-r0
- debian pillow (Debian): \< 8.1.2+dfsg-0.2
- ubuntu pillow (Ubuntu): \< 3.1.2-0ubuntu1.6+esm3 \| \< 5.1.0-1ubuntu0.6 \| \< 7.0.0-4ubuntu0.4
- ubuntu pillow-python2 (Ubuntu): All versions (No fix recorded)
- fedoraproject fedora: 33
- PyPI pillow (PyPI): ≥ 2.4.0, \< 8.2.0 \| \< 8.2.0
- python pillow: \< 8.2.0

## References

- <https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#cve-2021-25287-cve-2021-25288-fix-oob-read-in-jpeg2kdecode>
- <https://github.com/python-pillow/Pillow/pull/5377#issuecomment-833821470>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/>
- <https://security.gentoo.org/glsa/202107-33>
- <https://security.alpinelinux.org/vuln/CVE-2021-25287>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-25287>
- <https://github.com/python-pillow/Pillow/pull/5377/commits/3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87>
- <https://github.com/python-pillow/Pillow/commit/3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87>
- <https://github.com/advisories/GHSA-77gc-v2xv-rvvh>
- <https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-137.yaml>
- <https://github.com/python-pillow/Pillow>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/>
- <https://ubuntu.com/security/CVE-2021-25287>
- <https://ubuntu.com/security/notices/USN-4963-1>
- <https://www.cve.org/CVERecord?id=CVE-2021-25287>
- <https://ubuntu.com/security/notices/USN-8135-1>
- <https://security-tracker.debian.org/tracker/CVE-2021-25287>

---

Data as of 2026-12-05T06:22:26.349Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
