{"id":"CVE-2026-42311","published":"2026-05-09T04:11:58Z","modified":"2026-05-12T02:24:33Z","title":"Pillow: OOB Write with Invalid PSD Tile Extents (Integer Overflow)","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.6,"severity":"HIGH","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0015,"percentile":0.04224,"provenance":"source"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-pwv6-vv43-88gr","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/pull/9520","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/12.2.0","tags":["x_refsource_MISC"]}],"priority":{"score":6.9,"factors":[{"name":"EPSS percentile","points":0.84},{"name":"CVSS severity","points":6.02}]},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":[">= 10.3.0, < 12.2.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-05-12T02:24:20.356743Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pillow","vulnerableRanges":[">=10.3.0, <12.2.0"],"patched":["12.2.0"],"from":["GHSA-pwv6-vv43-88gr","PYSEC-2026-2252"],"provenance":"source"}],"summary":{"text":"The flaw is an out-of-bounds write caused by an integer overflow when Pillow, a Python imaging library, parses invalid tile extents in PSD files. It affects Pillow from version 10.3.0 up to, but not including, version 12.2.0. An attacker who supplies a malicious PSD file to a vulnerable Pillow installation can corrupt memory, which may crash the process or lead to arbitrary code execution. The attack requires only local access (the file must be processed on the affected system), needs no privileges or user interaction, and occurs under default configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:13:32Z"},"euvd":{"id":"EUVD-2026-28903","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-python-pillow-pillow-cve-2022-45199","parents":[{"from":"CVE-2026-25990","to":"CVE-2026-42311","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-pwv6-vv43-88gr","via":"reference","url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-cfh3-3jmp-rvhc"},{"kind":"same-code","provenance":"machine","files":["src/decode.c","src/encode.c"],"commits":["https://github.com/python-pillow/Pillow/commit/9000313cc5d4a31bdcdd6d7f0781101abab553aa","https://github.com/python-pillow/Pillow/commit/54ba4db542ad3c7b918812a4e2d69c27735a3199","https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea"],"basis":"shared function","functions":["_setimage"]},{"kind":"similar","provenance":"machine","score":0.4,"basis":"same product + CWE + description similarity"}]}],"children":[{"from":"CVE-2026-42311","to":"CVE-2026-112902","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/encode.c"],"commits":["https://github.com/python-pillow/Pillow/commit/570df030c0d30c2bf5336b2ab59f3902d8ab0b6d","https://github.com/python-pillow/Pillow/commit/af56ace297b0991d02988fcc2ea933e4824b4fb3","https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea"],"basis":"rarely changed file"}]}]}}