Out-of-bounds write in Pillow - CVE-2026-112397

 

Out-of-bounds write in Pillow - CVE-2026-112397

Published: November 3, 2026


Vulnerability identifier: #VU158913
CSH Severity: Medium
CVSS v4: 6.7 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-112397
CWE-ID: CWE-787
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service and potentially corrupt memory.

The vulnerability exists due to an out-of-bounds write in Pillow's native _imagingmorph component when performing morphology operations on a zero-width image. A remote attacker can supply a crafted PPM or PGM file declaring a width of 0 that, when processed by ImageMorph.MorphOp.apply(), causes the unchecked assignment outrow[0] = outrow[width - 1] = 0; to write outside the row buffer and crash the process.


Affected software

Pillow

How to mitigate CVE-2026-112397

Install security update from vendor's website.

Pillow - update to 13.0.0

External References

Related Security Bulletins