{"id":"CVE-2021-27921","published":"2021-03-03T08:41:57Z","modified":"2025-08-15T04:41:08Z","title":"Pillow before 8.1.2 allows attackers to cause a denial of service (memory consumption) because the reported size of a…","vendor":null,"product":null,"tier":"tail","description":{"text":"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 a BLP container, and thus an attempted memory allocation can be very large.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0317,"percentile":0.88336,"provenance":"source"},"cwes":[],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZ/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2ML/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S7G44Z33J4BNI2DPDROHWGVG2U7ZH5JU/","tags":["vendor-advisory"]},{"url":"https://security.gentoo.org/glsa/202107-33","tags":["vendor-advisory"]},{"url":"https://pillow.readthedocs.io/en/stable/releasenotes/8.1.2.html","tags":[]},{"url":"https://pillow.readthedocs.io/en/stable/releasenotes/8.1.1.html","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZ/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2ML/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S7G44Z33J4BNI2DPDROHWGVG2U7ZH5JU/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred"]}],"priority":{"score":17.7,"factors":[{"name":"EPSS percentile","points":17.67}]},"affected":[{"ecosystem":"PyPI","package":"Pillow","vulnerableRanges":["<8.1.2","<8.1.1"],"patched":["8.1.2","8.1.1"],"from":["GHSA-f4w8-cv6p-x6r5","PYSEC-2021-40"],"provenance":"source"}],"summary":{"text":"The flaw is in the BLP image-container handling of Pillow, a Python imaging library, where the size reported for a contained image is not properly validated before memory is allocated.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:27:58Z"},"euvd":{"id":"EUVD-2021-0177","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2016-9190","published":"2016-11-04","fixed":"3.3.2","kev":false},{"cve":"CVE-2020-5313","published":"2020-01-03","fixed":"6.2.2","kev":false},{"cve":"CVE-2021-25293","published":"2021-03-19","fixed":"8.1.1","kev":false},{"cve":"CVE-2021-27921","published":"2021-03-03","fixed":"8.1.2","kev":false},{"cve":"CVE-2021-28678","published":"2021-06-02","fixed":"8.2.0","kev":false,"link":{"from":"CVE-2021-27921","to":"CVE-2021-28678","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Pillow","fromFixed":"8.1.2","toFixed":"8.2.0","daysApart":91},{"kind":"same-code","provenance":"machine","files":["src/PIL/BlpImagePlugin.py"],"commits":["https://github.com/python-pillow/Pillow/commit/756fff33128a0b643d10518a26ad04b726dd8973","https://github.com/python-pillow/Pillow/commit/496245aa4365d0827390bd0b6fbd11287453b3a1"],"basis":"shared file"}]}},{"cve":"CVE-2022-24303","published":"2022-03-28","fixed":"9.0.1","kev":false},{"cve":"CVE-2022-30595","published":"2022-05-25","fixed":"9.1.1","kev":false}],"package":"PyPI:Pillow"}}