{"id":"CVE-2021-25289","aliases":["CVE-2021-25289","GHSA-57h3-9rgr-c24m","BIT-PILLOW-2021-25289","PYSEC-2021-35"],"related":[],"kind":"vulnerability","state":"published","title":"Out of bounds write in Pillow","summary":"An issue was discovered in Pillow before 8.1.1. TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode. NOTE: this issue exists because of an incomplete fix for CVE-2020-35654.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in Pillow before 8.1.1. TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode. NOTE: this issue exists because of an incomplete fix for CVE-2020-35654.","source":"cvelist"},{"lang":"es","text":"Se detectó un problema en Pillow versiones anteriores a 8.1.1.&#xa0;La función TiffDecode presenta un desbordamiento de búfer en la región heap de la memoria cuando se decodifican archivos YCbCr diseñados debido a determinados conflictos de interpretación con LibTIFF en el modo RGBA.&#xa0;NOTA: este problema se presenta debido a una corrección incompleta para CVE-2020-35654","source":"nvd"}],"published":"2021-03-19T03:29:48.000Z","modified":"2026-09-08T08:48:18.491Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"8.1.1"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"8.1.1"}],"vendor":"python","product":"pillow","cpe":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"8.1.1"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.1.1"}],"ecosystem":"Bitnami","package":"pillow","purl":"pkg:bitnami/pillow","source":"bitnami"}],"references":[{"url":"https://pillow.readthedocs.io/en/stable/releasenotes/8.1.1.html","tags":["advisory","release-notes","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://security.gentoo.org/glsa/202107-33","tags":["advisory","third-party-advisory","vendor-advisory","web","x-refsource-gentoo","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25289","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/commit/3fee28eb9479bf7d59e0fa08068f9cc4a6e2f04c","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/python-pillow/Pillow/commit/cbfdde7b1f2295059a20a539ee9960f0bec7b299","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-57h3-9rgr-c24m","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-35.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/python-pillow/Pillow","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-25289","url":"https://www.cve.org/CVERecord?id=CVE-2021-25289","licence":"CVE Terms of Use","modified":"2024-08-03T19:56:11.196Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-57h3-9rgr-c24m","url":"https://github.com/advisories/GHSA-57h3-9rgr-c24m","licence":"CC-BY-4.0","modified":"2024-10-08T13:22:45.198Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-25289","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-25289","licence":"Public domain","modified":"2026-06-17T03:41:46.407Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-35","url":"https://osv.dev/vulnerability/PYSEC-2021-35","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:57.530Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PILLOW-2021-25289","url":"https://osv.dev/vulnerability/BIT-PILLOW-2021-25289","licence":"Apache-2.0","modified":"2026-09-08T08:48:18.491Z"}],"updatedAt":"2026-11-25T22:58:00.341Z","epss":{"score":0.02032,"percentile":0.81622,"date":"2026-12-01T12:00:22.000Z"}}