{"schema_version":"1.7.5","id":"GHSA-pwv6-vv43-88gr","published":"2026-05-04T20:20:31Z","modified":"2026-07-13T07:26:52.198871129Z","aliases":["BIT-pillow-2026-42311","CVE-2026-42311","PYSEC-2026-2252"],"related":["CGA-r9w3-5fv2-4vx9"],"summary":"Pillow has an OOB Write with Invalid PSD Tile Extents (Integer Overflow)","details":"### 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)","affected":[{"package":{"name":"pillow","ecosystem":"PyPI","purl":"pkg:pypi/pillow"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"10.3.0"},{"fixed":"12.2.0"}]}],"versions":["10.3.0","10.4.0","11.0.0","11.1.0","11.2.1","11.3.0","12.0.0","12.1.0","12.1.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-pwv6-vv43-88gr/GHSA-pwv6-vv43-88gr.json"}}],"references":[{"type":"WEB","url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-cfh3-3jmp-rvhc"},{"type":"WEB","url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-pwv6-vv43-88gr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42311"},{"type":"WEB","url":"https://github.com/python-pillow/Pillow/pull/9520"},{"type":"WEB","url":"https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea"},{"type":"PACKAGE","url":"https://github.com/python-pillow/Pillow"},{"type":"WEB","url":"https://github.com/python-pillow/Pillow/releases/tag/12.2.0"}],"database_specific":{"cwe_ids":["CWE-190","CWE-787"],"github_reviewed":true,"github_reviewed_at":"2026-05-04T20:20:31Z","nvd_published_at":"2026-05-09T06:16:10Z","severity":"HIGH"},"severity":[{"type":"CVSS_V4","score":"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"}]}