Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Pillow
  4. ›
  5. CVE-2021-27923

CVE-2021-27923: Pillow Denial of Service by Uncontrolled Resource Consumption

March 18, 2021 (updated August 15, 2025)

Pillow before 8.1.2 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for an ICO container, and thus an attempted memory allocation can be very large.

References

  • github.com/advisories/GHSA-95q3-8gr9-gm8w
  • github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-42.yaml
  • github.com/python-pillow/Pillow
  • github.com/python-pillow/Pillow/commit/756fff33128a0b643d10518a26ad04b726dd8973
  • lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S7G44Z33J4BNI2DPDROHWGVG2U7ZH5JU
  • lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2ML
  • lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZ
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S7G44Z33J4BNI2DPDROHWGVG2U7ZH5JU
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2ML
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZ
  • nvd.nist.gov/vuln/detail/CVE-2021-27923
  • pillow.readthedocs.io/en/stable/releasenotes/8.1.1.html
  • pillow.readthedocs.io/en/stable/releasenotes/8.1.2.html
  • security.gentoo.org/glsa/202107-33

Code Behaviors & Features

Detect and mitigate CVE-2021-27923 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 8.1.2

Fixed versions

  • 8.1.2

Solution

Upgrade to version 8.1.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation
  • CWE-400: Uncontrolled Resource Consumption

Source file

pypi/Pillow/CVE-2021-27923.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:01 +0000.