Security fix · CVE-2026-112399
Pillow is a Python imaging library.
Published Oct 19, 2026 · catalog updated Oct 26, 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-112399. EPSS is 0.53%. 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.53%
- Remediation
- Version ranges on file
- Affected products
- Bitnami pillow · PyPI pillow · pip Pillow · pypi pillow
A 126-byte animated PNG file makes Pillow's allocate and fill memory sized by the image dimensions the file claims, before Pillow's built-in check for oversized images runs. A file claiming 22000×22000 pixels costs about 1.9 GB. Anyone who can get an application to open an image they supply, with default settings and no further calls such as , can cause a multi-gigabyte memory spike per file. If the claimed size exceeds the machine's free memory, the operating system kills the process outright. The bug is in in (around line 1000). For any APNG, calls . When the first chunk requests disposal, calls with the full IHDR size, which allocates and zero-fills width×height×4 bytes. takes the same path, because frame 0 rewrites it to . This all happens inside the plugin factory, so 's only runs after the memory has been touched. A 1×1 frame rectangle passes the only checks on the way. Below available memory, the allocation is freed when propagates, so sustained pressure needs repeated or concurrent uploads. A 45000×45000 header gets the process killed by the out-of-memory killer on an 8 GB host. The attached reproducer opens two such files that differ in one byte ( 0 vs 1). Both end in , but peak resident memory is 17 MB for the first and 1864 MB for the second. The eager fill was introduced in 5e4e0fa6ee67 ("Use disposal settings from previous frame", December 2020) and first shipped in 8.1.0. Two candidate patches with a regression test are attached. ## Details For an APNG whose first chunk requests disposal, creates and zero-fills a core image of the full IHDR-declared size. This happens inside the plugin factory, i.e. before gets to , so the check that is meant to reject oversized headers without allocating anything runs only after the allocation has been made and touched. The following 126-byte file (all chunk lengths and CRCs valid) makes , with default and no , reach 1.86 GB resident ( ) and then raise . The byte-identical file with raises the same error at 17 MB. Wit
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 pillow8.1.0 → 13.0.0
- PyPI pillow8.1.0 → 13.0.0
- pip Pillow>= 8.1.0, < 13.0.0
- pypi pillowversion unspecified
How to fix CVE-2026-112399
Upgrade
CVE-2026-112399 lists a fix boundary at 13.0.0. Compare the installed build with that boundary before you change production.
Version check
Affected < 13.0.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-112399. EPSS is 0.53%. Act only if a listed version of Pillow is a Python is installed.
Which versions are affected?
Compare what you have installed with Pillow >= 8.1.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-789. EPSS 0.53%. 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. From 8.1.0 until 13.0.0, Pillow can allocate an APNG disposal background at the full canvas size before applying the decompression-bomb check. A crafted APNG with a small first frame, a very large declared canvas, and background disposal or first-frame OP_PREVIOUS reaches PngImageFile._seek while Image.open() positions frame zero. The full-canvas allocation occu
Oct 20, 2026 · NIST NVD
Updated
Pillow is a Python imaging library. From 8.1.0 until 13.0.0, Pillow can allocate an APNG disposal background at the full canvas size before applying the decompression-bomb check. A crafted APNG with a small first frame, a very large declared canvas, and background disposal or first-frame OP_PREVIOUS reaches PngImageFile._seek while Image.open() positions frame zero. The full-canvas allocation occu
Oct 21, 2026 · GitHub Advisory Database
Updated
A 126-byte animated PNG file makes Pillow's allocate and fill memory sized by the image dimensions the file claims, before Pillow's built-in check for oversized images runs. A file claiming 22000×22000 pixels costs about 1.9 GB. Anyone who can get an application to open an image they supply, with default settings and no further calls such as , can cause a multi-gigabyte memory spike per file. If t
Oct 26, 2026 · GitHub Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · GitHub Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · GitHub Advisory Database
Updated
A 126-byte animated PNG file makes Pillow's allocate and fill memory sized by the image dimensions the file claims, before Pillow's built-in check for oversized images runs. A file claiming 22000×22000 pixels costs about 1.9 GB. Anyone who can get an application to open an image they supply, with default settings and no further calls such as , can cause a multi-gigabyte memory spike per file. If t
Sources
- CVE.orgVulnerability recordCVE-2026-112399
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-112399
30-day exploitation probability 0.53%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-5xm2-6676-qcp9
GitHub Advisory Database record mirrored by OSV.
github.com - GitLab Advisory DatabasePackage advisoryCVE-2026-112399
============================================================================ APNG background disposal allocates full canvas before decompression bomb check Location: src/PIL/PngImagePlugin.py:1000 in PngImageFile._seek() Commit: a707c6b21c313880d0771e54965d142dd42358b6 ============================================================================ A 126-byte animated PNG file makes Pillow's Image.ope
advisories.gitlab.com - NIST NVDVulnerability recordCVE-2026-112399
Pillow is a Python imaging library. From 8.1.0 until 13.0.0, Pillow can allocate an APNG disposal background at the full canvas size before applying the decompression-bomb check. A crafted APNG with a small first frame, a very large declared canvas, and background disposal or fir
nvd.nist.gov - OpenSSF OSV / OSV ScannerPackage advisoryBIT-pillow-2026-112399
Pillow: APNG background disposal allocates full canvas before decompression bomb check
osv.dev - OpenSSF OSV / OSV ScannerPackage advisoryGHSA-5xm2-6676-qcp9
Pillow: APNG background disposal allocates full canvas before decompression bomb check
osv.dev - PyPA Advisory DatabasePackage advisoryGHSA-5xm2-6676-qcp9
Pillow: APNG background disposal allocates full canvas before decompression bomb check
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 26, 2026
- OpenSSF OSV / OSV ScannerOct 26, 2026
- PyPA Advisory DatabaseOct 26, 2026
- OpenSSF OSV / OSV ScannerOct 26, 2026
- GitLab Advisory DatabaseOct 23, 2026
- CVE.orgOct 21, 2026
- NIST NVDOct 21, 2026