CVE-2021-25287
python-pillow: Out-of-bounds read in J2K image reader
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, Bitnami. Rated lower by GHSA (high), Red Hat (medium), AlmaLinux (medium), Rocky Linux (medium), Ubuntu (low).
Description
An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_graya_la.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| bitnami::Bitnami Vulnerability Database | pillow | 8.2.0 |
| alma 8 | python3-pillow | 5.1.1-16.el8 |
| alpine 3.14 | py3-pillow | 8.2.0-r0 |
| alpine 3.15 | py3-pillow | 8.2.0-r0 |
| alpine 3.16 | py3-pillow | 8.2.0-r0 |
| alpine 3.17 | py3-pillow | 8.2.0-r0 |
| alpine 3.18 | py3-pillow | 8.2.0-r0 |
| alpine 3.19 | py3-pillow | 8.2.0-r0 |
| alpine 3.20 | py3-pillow | 8.2.0-r0 |
| alpine 3.21 | py3-pillow | 8.2.0-r0 |
| alpine 3.22 | py3-pillow | 8.2.0-r0 |
| alpine 3.23 | py3-pillow | 8.2.0-r0 |
Show all 45 entries from 40 sources
| Source | Package | Fixed in |
|---|---|---|
| bitnami::Bitnami Vulnerability Database | pillow | 8.2.0 |
| alma 8 | python3-pillow | 5.1.1-16.el8 |
| alpine 3.14 | py3-pillow | 8.2.0-r0 |
| alpine 3.15 | py3-pillow | 8.2.0-r0 |
| alpine 3.16 | py3-pillow | 8.2.0-r0 |
| alpine 3.17 | py3-pillow | 8.2.0-r0 |
| alpine 3.18 | py3-pillow | 8.2.0-r0 |
| alpine 3.19 | py3-pillow | 8.2.0-r0 |
| alpine 3.20 | py3-pillow | 8.2.0-r0 |
| alpine 3.21 | py3-pillow | 8.2.0-r0 |
| alpine 3.22 | py3-pillow | 8.2.0-r0 |
| alpine 3.23 | py3-pillow | 8.2.0-r0 |
| alpine 3.24 | py3-pillow | 8.2.0-r0 |
| alpine edge | py3-pillow | 8.2.0-r0 |
| debian 11 | pillow | 8.1.2+dfsg-0.2 |
| debian 12 | pillow | 8.1.2+dfsg-0.2 |
| debian 13 | pillow | 8.1.2+dfsg-0.2 |
| debian 14 | pillow | 8.1.2+dfsg-0.2 |
| echo | pillow | 8.1.2+dfsg-0.2 |
| pip::GitHub Security Advisory pip | pillow | 8.2.0 |
| Red Hat | python-pillow | no fix listed |
| Red Hat | python-pillow-devel | no fix listed |
| Red Hat | python-pillow-doc | no fix listed |
| Red Hat | python-pillow-qt | no fix listed |
| Red Hat | python-pillow-sane | no fix listed |
| Red Hat | python-pillow-tk | no fix listed |
| rocky 8 | python3-pillow | 5.1.1-16.el8 |
| ubuntu 16.04-ESM | pillow | 3.1.2-0ubuntu1.6+esm3 |
| ubuntu 18.04 | pillow | 5.1.0-1ubuntu0.6 |
| ubuntu 18.04-ESM | pillow | 5.1.0-1ubuntu0.6 |
| ubuntu 20.04 | pillow | 7.0.0-4ubuntu0.4 |
| ubuntu 20.04-ESM | pillow | 7.0.0-4ubuntu0.4 |
| ubuntu 20.10 | pillow | 7.2.0-1ubuntu0.3 |
| ubuntu 21.04 | pillow | 8.1.2-1ubuntu0.1 |
| ubuntu 21.10 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 22.04 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 22.10 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 23.04 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 23.10 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 24.04 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 24.10 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 25.04 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 25.10 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 26.04 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| ubuntu 26.10 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
References
- https://access.redhat.com/errata/RHSA-2021:4149
- https://access.redhat.com/security/cve/CVE-2021-25287
- https://bugzilla.redhat.com/show_bug.cgi?id=1915420
- https://bugzilla.redhat.com/show_bug.cgi?id=1915432
- https://bugzilla.redhat.com/show_bug.cgi?id=1934685
- https://bugzilla.redhat.com/show_bug.cgi?id=1934699
- https://bugzilla.redhat.com/show_bug.cgi?id=1934705
- https://bugzilla.redhat.com/show_bug.cgi?id=1935384
All 48 references
- https://bugzilla.redhat.com/show_bug.cgi?id=1935396
- https://bugzilla.redhat.com/show_bug.cgi?id=1935401
- https://bugzilla.redhat.com/show_bug.cgi?id=1958226
- https://bugzilla.redhat.com/show_bug.cgi?id=1958231
- https://bugzilla.redhat.com/show_bug.cgi?id=1958240
- https://bugzilla.redhat.com/show_bug.cgi?id=1958252
- https://bugzilla.redhat.com/show_bug.cgi?id=1958257
- https://bugzilla.redhat.com/show_bug.cgi?id=1958263
- https://bugzilla.redhat.com/show_bug.cgi?id=1982378
- https://creativecommons.org/licenses/by/4.0/
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-35653
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-35655
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25287
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25288
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25290
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25292
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25293
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27921
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27922
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27923
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28675
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28676
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28677
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28678
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34552
- https://errata.rockylinux.org/RLSA-2021:4149
- 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://github.com/python-pillow/Pillow/commit/3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87
- https://github.com/python-pillow/Pillow/pull/5377#issuecomment-833821470
- https://github.com/python-pillow/Pillow/pull/5377/commits/3bf5eddb89afdf690eceaa52bc4d3546ba9a5f87
- 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://nvd.nist.gov/vuln/detail/CVE-2021-25287
- https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#cve-2021-25287-cve-2021-25288-fix-oob-read-in-jpeg2kdecode
- https://security.gentoo.org/glsa/202107-33
- https://ubuntu.com/security/notices/USN-4963-1
- https://ubuntu.com/security/notices/USN-8135-1
- https://www.cve.org/CVERecord?id=CVE-2021-25287