{"id":"CVE-2026-42311","aliases":["CVE-2026-42311","GHSA-pwv6-vv43-88gr","BIT-PILLOW-2026-42311","PYSEC-2026-2252"],"related":[],"kind":"vulnerability","state":"published","title":"Pillow: OOB Write with Invalid PSD Tile Extents (Integer Overflow)","summary":"Pillow is a Python imaging library. From version 10.3.0 to before version 12.2.0, processing a malicious PSD file could lead to memory corruption, potentially resulting in a crash or arbitrary code execution. This issue has been patched in version 12.2.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Pillow is a Python imaging library. From version 10.3.0 to before version 12.2.0, processing a malicious PSD file could lead to memory corruption, potentially resulting in a crash or arbitrary code execution. This issue has been patched in version 12.2.0.","source":"cvelist"},{"lang":"en","text":"### Impact\nProcessing a malicious PSD file could lead to memory corruption, potentially resulting in a crash or arbitrary code execution.\n\n### Patches\nPatched version: 12.2.0\n\nPillow 12.1.1 addressed CVE-2026-25990 by adding checks for tile extents in PSD image decoding/encoding to prevent an out-of-bounds write. However, the bounds checks computed tile extent sums using types susceptible to integer overflow, meaning a PSD image with carefully chosen tile dimensions could produce values that wrap around and bypass the checks, still triggering an out-of-bounds write in src/decode.c and src/encode.c. The fix avoids adding extents together before comparison.\n\n### Workarounds\nUse any version but affected versions: >= 10.3.0, < 12.2.0\n\n### Resources\n - Fix: https://github.com/python-pillow/Pillow/pull/9520 \n - Original issue: CVE-2026-25990 (Pillow 12.1.1)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Pillow es una biblioteca de imágenes de Python. Desde la versión 10.3.0 hasta antes de la versión 12.2.0, el procesamiento de un archivo PSD malicioso podría llevar a una corrupción de memoria, lo que podría resultar en un fallo o ejecución de código arbitrario. Este problema ha sido parcheado en la versión 12.2.0.","source":"nvd"}],"published":"2026-05-04T20:20:31.000Z","modified":"2026-09-10T03:50:47.242Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-190","CWE-787"],"affected":[{"ranges":[{"version":">= 10.3.0, < 12.2.0","status":"affected"}],"vendor":"python-pillow","product":"Pillow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"10.3.0","status":"affected","fixed":"12.2.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"10.3.0","fixed":"12.2.0"}],"vendor":"python","product":"pillow","cpe":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"10.3.0","status":"affected","fixed":"12.2.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"10.3.0","status":"affected","fixed":"12.2.0"}],"ecosystem":"Bitnami","package":"pillow","purl":"pkg:bitnami/pillow","source":"bitnami"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-pwv6-vv43-88gr","tags":["advisory","fix","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/pull/9520","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/12.2.0","tags":["advisory","article","product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-cfh3-3jmp-rvhc","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42311","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/python-pillow/Pillow","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-05-12T02:24:20.356Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42311","url":"https://www.cve.org/CVERecord?id=CVE-2026-42311","licence":"CVE Terms of Use","modified":"2026-05-12T02:24:33.053Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pwv6-vv43-88gr","url":"https://github.com/advisories/GHSA-pwv6-vv43-88gr","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:47.242Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42311","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42311","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2252","url":"https://osv.dev/vulnerability/PYSEC-2026-2252","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:52.198Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PILLOW-2026-42311","url":"https://osv.dev/vulnerability/BIT-PILLOW-2026-42311","licence":"Apache-2.0","modified":"2026-09-08T08:48:18.491Z"}],"updatedAt":"2026-11-25T22:59:21.141Z","epss":{"score":0.0015,"percentile":0.04373,"date":"2026-12-01T12:00:22.000Z"}}