Every CVE Search/ Get API key

CVE-2021-28678

Insufficient Verification of Data Authenticity in Pillow

5.5 MediumFix available

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.73%Down 0.1 points since Jun 3, 2021
90%50%10%1%

What each source reports

NVD Score used 5.5

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
CVE-2021-28678
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CVSS 2.0
4.3 MediumAV:N/AC:M/Au:N/C:N/I:N/A:P
Weakness
CWE-345
Updated
2026-11-02
CVE List No score

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
CVE-2021-28678
Updated
2026-11-02
EUVDEUVD-2021-0185 No score

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
EUVD-2021-0185
Updated
2026-11-03
GitHub AdvisoriesGHSA-hjfx-8p6c-g7gx 6.8

Insufficient Verification of Data Authenticity in Pillow

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
GHSA-hjfx-8p6c-g7gx
CVSS 4.0
6.8 MediumCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-345
Updated
2026-11-02
OSVALPINE-CVE-2021-28678 5.5

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
ALPINE-CVE-2021-28678
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-03
OSV 5.5

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
CVE-2021-28678
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 12 moreShow less
OSVDEBIAN-CVE-2021-28678 5.5

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
DEBIAN-CVE-2021-28678
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGHSA-hjfx-8p6c-g7gx 6.8

Insufficient Verification of Data Authenticity in Pillow

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
GHSA-hjfx-8p6c-g7gx
CVSS 4.0
6.8 MediumCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-345
Updated
2026-11-02
OSVRHSA-2021:4149 9.1

Red Hat Security Advisory: python-pillow security update

Record
RHSA-2021:4149
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Updated
2026-11-02
OSVRLSA-2021:4149 9.1

Moderate: python-pillow security update

The python-pillow packages contain a Python image processing library that provides extensive file format support, an efficient internal representation, and powerful image-processing capabilities.

Security Fix(es):

  • python-pillow: Out-of-bounds read in J2K image reader (CVE-2021-25287)

  • python-pillow: Out-of-bounds read in J2K image reader (CVE-2021-25288)

  • python-pillow: Negative-offset memcpy in TIFF image reader (CVE-2021-25290)

  • python-pillow: Regular expression DoS in PDF format parser (CVE-2021-25292)

  • python-pillow: Out-of-bounds read in SGI RLE image reader (CVE-2021-25293)

  • python-pillow: Excessive memory allocation in BLP image reader (CVE-2021-27921)

  • python-pillow: Excessive memory allocation in ICNS image reader (CVE-2021-27922)

  • python-pillow: Excessive memory allocation in ICO image reader (CVE-2021-27923)

  • python-pillow: Excessive memory allocation in PSD image reader (CVE-2021-28675)

  • python-pillow: Infinite loop in FLI image reader (CVE-2021-28676)

  • python-pillow: Excessive CPU use in EPS image reader (CVE-2021-28677)

  • python-pillow: Excessive looping in BLP image reader (CVE-2021-28678)

  • python-pillow: Buffer overflow in image convert function (CVE-2021-34552)

  • python-pillow: Buffer over-read in PCX image reader (CVE-2020-35653)

  • python-pillow: Buffer over-read in SGI RLE image reader (CVE-2020-35655)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Additional Changes:

For detailed information on changes in this release, see the Rocky Linux 8.5 Release Notes linked from the References section.

Record
RLSA-2021:4149
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-28678 5.5

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
UBUNTU-CVE-2021-28678
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVALSA-2021:4149 No score

Moderate: python-pillow security update

The python-pillow packages contain a Python image processing library that provides extensive file format support, an efficient internal representation, and powerful image-processing capabilities.

Security Fix(es):

  • python-pillow: Out-of-bounds read in J2K image reader (CVE-2021-25287)

  • python-pillow: Out-of-bounds read in J2K image reader (CVE-2021-25288)

  • python-pillow: Negative-offset memcpy in TIFF image reader (CVE-2021-25290)

  • python-pillow: Regular expression DoS in PDF format parser (CVE-2021-25292)

  • python-pillow: Out-of-bounds read in SGI RLE image reader (CVE-2021-25293)

  • python-pillow: Excessive memory allocation in BLP image reader (CVE-2021-27921)

  • python-pillow: Excessive memory allocation in ICNS image reader (CVE-2021-27922)

  • python-pillow: Excessive memory allocation in ICO image reader (CVE-2021-27923)

  • python-pillow: Excessive memory allocation in PSD image reader (CVE-2021-28675)

  • python-pillow: Infinite loop in FLI image reader (CVE-2021-28676)

  • python-pillow: Excessive CPU use in EPS image reader (CVE-2021-28677)

  • python-pillow: Excessive looping in BLP image reader (CVE-2021-28678)

  • python-pillow: Buffer overflow in image convert function (CVE-2021-34552)

  • python-pillow: Buffer over-read in PCX image reader (CVE-2020-35653)

  • python-pillow: Buffer over-read in SGI RLE image reader (CVE-2020-35655)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Additional Changes:

For detailed information on changes in this release, see the AlmaLinux Release Notes linked from the References section.

Record
ALSA-2021:4149
Updated
2026-11-02
OSVBIT-pillow-2021-28678 No score

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
BIT-pillow-2021-28678
Updated
2026-11-02
OSVMGASA-2021-0389 No score

Updated python-pillow packages fix security vulnerabilities

Updated python-pillow packages fix security vulnerabilities:

An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_graya_la (CVE-2021-25287).

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

An issue was discovered in Pillow before 8.2.0. PSDImagePlugin.PsdImageFile lacked a sanity check on the number of input layers relative to the size of the data block. This could lead to a DoS on Image.open prior to Image.load (CVE-2021-28675).

An issue was discovered in Pillow before 8.2.0. For FLI data, FliDecode did not properly check that the block advance was non-zero, potentially leading to an infinite loop on load (CVE-2021-28676).

An issue was discovered in Pillow before 8.2.0. For EPS data, the readline implementation used in EPSImageFile has to deal with any combination of \r and \n as line endings. It used an accidentally quadratic method of accumulating lines while looking for a line ending. A malicious EPS file could use this to perform a DoS of Pillow in the open phase, before an image was accepted for opening (CVE-2021-28677).

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data (CVE-2021-28678).

Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters directly into a convert function to trigger a buffer overflow in Convert.c (CVE-2021-34552).

Record
MGASA-2021-0389
Updated
2026-11-02
OSVPYSEC-2021-94 No score

An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data.

Record
PYSEC-2021-94
Updated
2026-11-02
OSVSUSE-SU-2021:1938-1 No score

Security update for python-Pillow

This update for python-Pillow fixes the following issues:

  • CVE-2020-35655: Fixed a buffer over-read when decoding crafted SGI RLE image files (bsc#1180832).
  • CVE-2021-25293: Fixed an out-of-bounds read in SGIRleDecode.c (bsc#1183102).
  • CVE-2021-25290: Fixed a negative-offset memcpy with an invalid size in TiffDecode.c (bsc#1183105).
  • CVE-2021-25292: Fixed a backtracking regex in PDF parser could be used as a DOS attack (bsc#1183101).
  • CVE-2021-27921,CVE-2021-27922,CVE-2021-27923: Fixed improper reported size of a contained image (bsc#1183110,bsc#1183108,bsc#1183107)
  • CVE-2020-35653: Fixed buffer over-read in PcxDecode when decoding a crafted PCX file (bsc#1180834).
  • CVE-2021-25287: Fixed out-of-bounds read in J2kDecode in j2ku_graya_la (bsc#1185805).
  • CVE-2021-25288: Fixed out-of-bounds read in J2kDecode in j2ku_gray_i (bsc#1185803).
  • CVE-2021-28675: Fixed DoS in PsdImagePlugin (bsc#1185804).
  • CVE-2021-28678: Fixed improper check in BlpImagePlugin (bsc#1185784).
  • CVE-2021-28677: Fixed DoS in the open phase via a malicious EPS file (bsc#1185785).
  • CVE-2021-28676: Fixed infinite loop in FliDecode.c (bsc#1185786).
Record
SUSE-SU-2021:1938-1
Updated
2026-11-02
OSVSUSE-SU-2024:1607-1 No score

Security update for python-Pillow

This update for python-Pillow fixes the following issues:

  • CVE-2021-25287: out-of-bounds read in J2kDecode in j2ku_graya_la (bsc#1185805)
  • CVE-2021-25288: out-of-bounds read in J2kDecode in j2ku_gray_i (bsc#1185803)
  • CVE-2021-28675: DoS in PsdImagePlugin (bsc#1185804)
  • CVE-2021-28676: infinite loop in FliDecode.c can lead to DoS (bsc#1185786)
  • CVE-2021-28677: DoS in the open phase via a malicious EPS file (bsc#1185785)
  • CVE-2021-28678: improper check in BlpImagePlugin can lead to DoS (bsc#1185784)
Record
SUSE-SU-2024:1607-1
Updated
2026-11-02
OSVUSN-4963-1 No score

pillow vulnerabilities

It was discovered that Pillow incorrectly handled certain image files. If a user or automated system were tricked into opening a specially-crafted file, a remote attacker could cause Pillow to crash or hand, resulting in a denial of service.

Record
USN-4963-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
pillow
PyPI
5.1.0 up to 8.2.0
8.2.0
py3-pillow
Alpine:v3.14
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.15
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.16
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.17
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.18
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.19
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.20
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.21
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.22
before 8.2.0-r0
8.2.0-r0
Show 25 moreShow less
Affected packages
PackageAffectedFixed
py3-pillow
Alpine:v3.23
before 8.2.0-r0
8.2.0-r0
py3-pillow
Alpine:v3.24
before 8.2.0-r0
8.2.0-r0
python3-pillow
AlmaLinux:8
From an advisory covering 15 CVEs
before 5.1.1-16.el8
5.1.1-16.el8
pillow
Bitnami
before 8.2.0
8.2.0
pillow
Debian:12
before 8.1.2+dfsg-0.2
8.1.2+dfsg-0.2
pillow
Debian:13
before 8.1.2+dfsg-0.2
8.1.2+dfsg-0.2
pillow
Debian:14
before 8.1.2+dfsg-0.2
8.1.2+dfsg-0.2
pillow
PyPI
5.1.0 up to 8.2.0, plus listed versions
5.2.05.3.05.4.05.4.0.dev05.4.1
Show 15 moreShow less
6.0.06.1.06.2.06.2.16.2.27.0.07.1.07.1.17.1.27.2.08.0.08.0.18.1.08.1.18.1.2
8.2.0
python-pillow
Mageia:8
From an advisory covering 7 CVEs
before 8.1.2-1.mga8
8.1.2-1.mga8
pillow
PyPI
before 8.2.0, plus listed versions
1.01.11.21.31.4
Show 45 moreShow less
1.51.61.7.01.7.11.7.21.7.31.7.41.7.51.7.61.7.71.7.82.0.02.1.02.2.02.2.12.2.22.3.02.3.12.3.22.4.02.5.02.5.12.5.22.5.32.6.02.6.12.6.22.7.02.8.02.8.12.8.22.9.03.0.03.1.03.1.0.rc13.1.0rc13.1.13.1.23.2.03.3.03.3.13.3.23.3.33.4.03.4.1
8.2.0
python-pillow
Red Hat:enterprise_linux:8::appstream
From an advisory covering 15 CVEs
before 0:5.1.1-16.el8
0:5.1.1-16.el8
python-pillow-debuginfo
Red Hat:enterprise_linux:8::appstream
From an advisory covering 15 CVEs
before 0:5.1.1-16.el8
0:5.1.1-16.el8
python-pillow-debugsource
Red Hat:enterprise_linux:8::appstream
From an advisory covering 15 CVEs
before 0:5.1.1-16.el8
0:5.1.1-16.el8
python3-pillow
Red Hat:enterprise_linux:8::appstream
From an advisory covering 15 CVEs
before 0:5.1.1-16.el8
0:5.1.1-16.el8
python3-pillow-debuginfo
Red Hat:enterprise_linux:8::appstream
From an advisory covering 15 CVEs
before 0:5.1.1-16.el8
0:5.1.1-16.el8
python3-pillow-tk-debuginfo
Red Hat:enterprise_linux:8::appstream
From an advisory covering 15 CVEs
before 0:5.1.1-16.el8
0:5.1.1-16.el8
python-pillow
Rocky Linux:8
From an advisory covering 15 CVEs
before 0:5.1.1-16.el8
0:5.1.1-16.el8
python-Pillow
SUSE:OpenStack Cloud 9
From an advisory covering 14 CVEs
before 5.2.0-3.8.1
5.2.0-3.8.1
python-Pillow
SUSE:OpenStack Cloud Crowbar 9
From an advisory covering 14 CVEs
before 5.2.0-3.8.1
5.2.0-3.8.1
python-Pillow
openSUSE:Leap 15.5
From an advisory covering 6 CVEs
before 7.2.0-150300.3.12.1
7.2.0-150300.3.12.1
pillow
Ubuntu:18.04:LTS
before 5.1.0-1ubuntu0.6, plus listed versions
4.1.1-3build24.3.0-2ubuntu15.0.0-15.1.0-15.1.0-1ubuntu0.25.1.0-1ubuntu0.35.1.0-1ubuntu0.45.1.0-1ubuntu0.5
5.1.0-1ubuntu0.6
pillow
Ubuntu:20.04:LTS
before 7.0.0-4ubuntu0.4, plus listed versions
6.1.0-16.1.0-1build16.2.1-27.0.0-47.0.0-4build17.0.0-4ubuntu0.17.0.0-4ubuntu0.27.0.0-4ubuntu0.3
7.0.0-4ubuntu0.4
pillow-python2
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
6.2.1-3~build16.2.1-36.2.1-3ubuntu0.1~esm16.2.1-3ubuntu0.1~esm2
None known
pillow
Ubuntu:18.04:LTS
From an advisory covering 6 CVEs
before 5.1.0-1ubuntu0.6, plus listed versions
4.1.1-3build24.3.0-2ubuntu15.0.0-15.1.0-15.1.0-1ubuntu0.25.1.0-1ubuntu0.35.1.0-1ubuntu0.45.1.0-1ubuntu0.5
5.1.0-1ubuntu0.6
pillow
Ubuntu:20.04:LTS
From an advisory covering 6 CVEs
before 7.0.0-4ubuntu0.4, plus listed versions
6.1.0-16.1.0-1build16.2.1-27.0.0-47.0.0-4build17.0.0-4ubuntu0.17.0.0-4ubuntu0.27.0.0-4ubuntu0.3
7.0.0-4ubuntu0.4

History

History
RecordedChangedSources
affected, facts
affectedOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-28678 is a medium vulnerability (CVSS 5.5) in Python Pillow, published May 10, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.73%, the 54th percentile. Fixed in pillow 8.2.0.

References

Show 126 moreShow less
This page doesn't list everything

Left out here: 29 versions. The JSON record has them.

MoveEnter Open