{"id":"CVE-2026-42311","aliases":["BIT-pillow-2026-42311","GHSA-pwv6-vv43-88gr","PYSEC-2026-2252"],"url":"https://o3.security/vulnerability/CVE-2026-42311","summary":"Pillow: 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)","published":"2026-05-09T04:11:58.092Z","modified":"2026-08-12T03:51:33.853211847Z","cvss":null,"epss":{"score":0.0015,"percentile":0.04396,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"pillow","fixedVersion":"12.2.0"}],"fix":{"url":"https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea","label":"python-pillow/Pillow@58f9a1d"},"references":[{"type":"WEB","url":"https://github.com/python-pillow/Pillow/releases/tag/12.2.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42311.json"},{"type":"ADVISORY","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":"FIX","url":"https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea"},{"type":"FIX","url":"https://github.com/python-pillow/Pillow/pull/9520"},{"type":"WEB","url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-cfh3-3jmp-rvhc"},{"type":"PACKAGE","url":"https://github.com/python-pillow/Pillow"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:33.853211847Z"}}