PatchSiren cyber security CVE debrief
CVE-2026-112399 python-pillow CVE debrief
A memory spike vulnerability exists in Pillow's handling of animated PNG files. When the `Image.open()` function is called with a specially crafted APNG file, it can cause a multi-gigabyte memory spike. This is due to the allocation and filling of memory based on the image dimensions claimed by the file, before Pillow's built-in check for oversized images runs.
- Vendor
- python-pillow
- Product
- pillow
- CVSS
- HIGH 8.7
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-10-21
- Original CVE updated
- 2026-10-21
- Advisory published
- 2026-10-21
- Advisory updated
- 2026-10-21
Who should care
Defenders responsible for maintaining and securing applications that use Pillow should be aware of this vulnerability and take steps to prevent potential memory spikes. This includes verifying and updating Pillow to version 13.0.0 or later, reviewing and restricting image file uploads, and monitoring system memory usage. Additionally, defenders should review compensating controls for exposed systems, check relevant monitoring and logs, and track exceptions
Why it matters
Defenders should prioritize verifying and updating Pillow to version 13.0.0 or later to prevent potential memory spikes. This vulnerability can cause performance issues and potentially lead to denial-of-service conditions. Verification of Pillow version and restriction of image file uploads are necessary to prevent exploitation.
- Memory spikes can cause performance issues and potentially lead to denial-of-service conditions
- Successful exploitation can lead to increased memory usage, potentially causing system instability
- Verification of Pillow version and restriction of image file uploads are necessary to prevent exploitation
Technical summary
The vulnerability exists in Pillow's handling of animated PNG files. When the `Image.open()` function is called with a specially crafted APNG file, it can cause a multi-gigabyte memory spike. This is due to the allocation and filling of memory based on the image dimensions claimed by the file, before Pillow's built-in check for oversized images runs. The bug is in `PngImageFile._seek()` in `src/PIL/PngImagePlugin.py` (around line 1000). For any APNG, `_open()` calls `self._seek(0)`. When the first `fcTL` chunk requests `OP_BACKGROUND` disposal, `_seek()` calls `Image.core.fill(self.mode, self.size)` with the full IHDR size, which allocates and zero-fills memory sized by the image dimensions the file claims.
Defensive priority
Defenders should prioritize verifying and updating Pillow to version 13.0.0 or later to prevent potential memory spikes.
Recommended defensive actions
- Verify and update Pillow to version 13.0.0 or later
- Review and restrict image file uploads to prevent malicious APNG files from being processed
- Monitor system memory usage and implement limits on memory-intensive operations
- Review compensating controls for exposed systems while remediation is scheduled and verified
- Check relevant monitoring, detection, and logs for exposed assets that need extra review
- Track exceptions, retest remediated assets, and close the item only after evidence is documented
- Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
Evidence notes
The vulnerability is caused by the allocation and filling of memory based on the image dimensions claimed by the APNG file, before Pillow's built-in check for oversized images runs. This can lead to a multi-gigabyte memory spike.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-112399 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-112399
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-112399 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-112399
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Pillow: APNG background disposal allocates full canvas before decompression bomb check
Unverified legacy reference
URL: https://storage.googleapis.com/osv-vulnerabilities/PyPI/GHSA-5xm2-6676-qcp9.json
osv_dev
-
Source reference
Unverified legacy reference
URL: https://github.com/python-pillow/Pillow/security/advisories/GHSA-5xm2-6676-qcp9
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/python-pillow/Pillow/commit/f1acfc54c53502948d0d14121872061df931db48
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/python-pillow/Pillow
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/python-pillow/Pillow/releases/tag/13.0.0
Supplemental source
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.