Security fix · CVE-2026-112397
Pillow is a Python imaging library.
Published Oct 19, 2026 · catalog updated Oct 28, 2026 · Pillow is a Python
Last checked Oct 31, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-112397. EPSS is 0.57%. Act only if a listed version of Pillow is a Python is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- High8.7
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.57%
- Remediation
- Version ranges on file
- Affected products
- Bitnami pillow · PyPI pillow · pip Pillow
### Summary A PPM or PGM file can declare a width of 0, which Pillow accepts, producing an image of size . Passing that image to makes the native morphology code index a row buffer at , which is when the width is 0. The process crashes. ### Details The PPM parser reads width and height with no lower-bound check: - The native writes the row edges with no guard that the width is positive: - sets and use the same edge-indexing pattern. ### PoC Run it: Observed on a source build of commit . Under AddressSanitizer: With width 0 the write lands on an unmapped page, so it surfaces as a SEGV pinned to the edge-write line rather than a redzone overflow. ### Impact Out-of-bounds write in a C extension. Affects any application that runs a morphology operation on an image opened from untrusted input. Result is a crash and possible memory corruption.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- Bitnami pillow0 → 13.0.0
- PyPI pillow0 → 13.0.0
- pip Pillow<= 12.3.0
How to fix CVE-2026-112397
Upgrade
CVE-2026-112397 lists a fix boundary at 13.0.0. Compare the installed build with that boundary before you change production.
Version check
Affected <= 12.3.0
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-112397. EPSS is 0.57%. Act only if a listed version of Pillow is a Python is installed.
Which versions are affected?
Compare what you have installed with Pillow <= 12.3.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-787: Out-of-bounds Write. EPSS 0.57%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 19, 2026 · NIST NVD
Detected
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's ImageMorph.MorphOp.apply() can access memory before a row buffer for a zero-width image. PPM and PGM input can create an image with width zero, and the native morphology routine indexes outrow[width - 1] without rejecting that geometry. An attacker can supply such an image to an application that applies a morphology operation. This can
Oct 20, 2026 · NIST NVD
Updated
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's ImageMorph.MorphOp.apply() can access memory before a row buffer for a zero-width image. PPM and PGM input can create an image with width zero, and the native morphology routine indexes outrow[width - 1] without rejecting that geometry. An attacker can supply such an image to an application that applies a morphology operation. This can
Oct 20, 2026 · GitHub Advisory Database
Updated
### Summary A PPM or PGM file can declare a width of 0, which Pillow accepts, producing an image of size . Passing that image to makes the native morphology code index a row buffer at , which is when the width is 0. The process crashes. ### Details The PPM parser reads width and height with no lower-bound check: - The native writes the row edges with no guard that the width is positive: - sets and
Oct 26, 2026 · PyPA Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · PyPA Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · PyPA Advisory Database
Updated
### Summary A PPM or PGM file can declare a width of 0, which Pillow accepts, producing an image of size . Passing that image to makes the native morphology code index a row buffer at , which is when the width is 0. The process crashes. ### Details The PPM parser reads width and height with no lower-bound check: - The native writes the row edges with no guard that the width is positive: - sets and
Oct 28, 2026 · PyPA Advisory Database
Updated
### Summary A PPM or PGM file can declare a width of 0, which Pillow accepts, producing an image of size . Passing that image to makes the native morphology code index a row buffer at , which is when the width is 0. The process crashes. ### Details The PPM parser reads width and height with no lower-bound check: - The native writes the row edges with no guard that the width is positive: - sets and
Sources
- CVE.orgVulnerability recordCVE-2026-112397
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-112397
30-day exploitation probability 0.57%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-58r4-6rv3-gfh8
GitHub Advisory Database record mirrored by OSV.
github.com - NIST NVDVulnerability recordCVE-2026-112397
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's ImageMorph.MorphOp.apply() can access memory before a row buffer for a zero-width image. PPM and PGM input can create an image with width zero, and the native morphology routine indexes outrow[width - 1] without reject
nvd.nist.gov - OpenSSF OSV / OSV ScannerPackage advisoryBIT-pillow-2026-112397
Pillow: Out-of-bounds access in _imagingmorph on a zero-width image
osv.dev - PyPA Advisory DatabasePackage advisoryGHSA-58r4-6rv3-gfh8
Pillow: Out-of-bounds access in _imagingmorph on a zero-width image
osv.dev - PyPA Advisory DatabasePackage advisoryPYSEC-2026-4329
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's ImageMorph.MorphOp.apply() can access memory before a row buffer for a zero-width image. PPM and PGM input can create an image with width zero, and the native morphology routine indexes outrow[width - 1] without reject
osv.dev
References
Freshness
Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- FIRST EPSSOct 31, 2026
- GitHub Advisory DatabaseOct 29, 2026
- OpenSSF OSV / OSV ScannerOct 29, 2026
- PyPA Advisory DatabaseOct 28, 2026
- PyPA Advisory DatabaseOct 28, 2026
- CVE.orgOct 21, 2026
- NIST NVDOct 21, 2026