High severity · published May 9, 2026
CVE-2026-42311
Pillow: OOB Write with Invalid PSD Tile Extents (Integer Overflow)
7.8
CVSS
0.2%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 4% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PI
Pillow · python-pillow
>= 10.3.0, < 12.2.0 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-42311
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-42311
Patch
https://github.com/python-pillow/Pillow/commit/58f9a1d166dcb0c274807d4423522d205b0c35ea
Issue Tracking
https://github.com/python-pillow/Pillow/pull/9520
Product
https://github.com/python-pillow/Pillow/releases/tag/12.2.0
Patch
https://github.com/python-pillow/Pillow/security/advisories/GHSA-pwv6-vv43-88gr
More from Pillow
9.8
CVE-2026-96639
Pillow multi-frame loaders can reuse stale native image storage after mode transitions
9.8
CVE-2026-112900
Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
9.8
CVE-2026-112403
Pillow: Heap buffer overflow in ImagingJpegDecode
9.8
CVE-2026-112398
Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution
9.8
CVE-2026-112393
Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
