Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-28678

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-28678
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:43 UTC · Revision 1

Source evidence

CVE-2021-28678

core-osv · Original source

Published 2 Jun 2021, 16:15 UTC

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.

osv:CVE-2021-28678
Complete source record
{
  "id": "5fb3b1c237a246429df2d0bb74d0617c2730a45a859762855edd3979af22cb81",
  "url": "https://osv.dev/vulnerability/CVE-2021-28678",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-28678",
    "summary": "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.",
    "evidence": "osv:CVE-2021-28678",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-28678",
      "aliases": [
        "BIT-pillow-2021-28678",
        "CVE-2021-28678",
        "GHSA-hjfx-8p6c-g7gx",
        "PYSEC-2021-94"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/python-pillow/pillow",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e0e353c0ef7516979a9aedce3792596649ce4433"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "8.2.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "8.1.0",
            "8.0.0",
            "7.2.0",
            "7.1.0",
            "7.0.0",
            "6.2.0",
            "6.1.0",
            "6.0.0",
            "5.4.0",
            "5.3.0",
            "5.2.0",
            "5.1.0",
            "5.0.0",
            "4.3.0",
            "4.2.0",
            "4.1.0",
            "4.0.0",
            "4.0.0a",
            "3.4.0",
            "3.3.0",
            "3.2.0",
            "3.1.0",
            "3.1.0-rc1",
            "2.9.0",
            "2.9.0.dev2",
            "2.9.0.dev1",
            "2.9.0.dev0",
            "2.8.1",
            "2.8.0",
            "2.7.0",
            "2.5.0",
            "2.3.0",
            "2.2.1",
            "2.2.0",
            "2.1.0",
            "2.0.0",
            "1.7.8",
            "1.7.7",
            "1.2",
            "1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-28678.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:36.220333269Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/",
        "https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#cve-2021-28678-fix-blp-dos",
        "https://security.gentoo.org/glsa/202107-33",
        "https://github.com/python-pillow/Pillow/pull/5377"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "33"
                  },
                  {
                    "last_affected": "33"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-28678",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385707,
  "published_at": "2021-06-02T16:15:08.86+00:00"
}