Skip to content
Heist/ feed
Back to feed
HighFix available

py3-pillow — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2021-28677

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.

Products
py3-pillow
Affected versions
Not specified
Fixed versions
8.2.0-r0
CVEs
CVE-2021-28677
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 22:03 UTC · Revision 1

Source evidence

ALPINE-CVE-2021-28677

core-osv · Original source

Published 2 Jun 2021, 16:15 UTC

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.

osv:ALPINE-CVE-2021-28677

py3-pillow

Fixed versions: 8.2.0-r0

py3-pillow

Fixed versions: 8.2.0-r0

Complete source record
{
  "id": "07c3bdde0254d95c2348e43968eb5d8954107a5af9117517e4d109785b52ca72",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-28677",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2021-28677",
    "summary": "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.",
    "evidence": "osv:ALPINE-CVE-2021-28677",
    "products": [
      {
        "name": {
          "value": "py3-pillow",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8.2.0-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "py3-pillow",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8.2.0-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2021-28677",
      "aliases": [
        "ALPINE-CVE-2021-28677"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "8.2.0-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "py3-pillow",
            "purl": "pkg:apk/alpine/py3-pillow?arch=source",
            "ecosystem": "Alpine:v3.14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-28677.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "8.2.0-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "py3-pillow",
            "purl": "pkg:apk/alpine/py3-pillow?arch=source",
            "ecosystem": "Alpine:v3.15"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-28677.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-23T17:17:56.171400750Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-28677"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2021-28677"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-28677",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 415382,
  "published_at": "2021-06-02T16:15:08.827+00:00"
}