
Key points
- The vulnerability affects Pillow versions 8.1.0 through 12.9.9.
- A fix is available in version 13.0.0, which corrects the allocation order.
- Attackers can trigger a denial of service without loading any image pixels.
Teams managing Python applications must verify their Pillow library versions immediately. The National Vulnerability Database lists CVE-2026-112399 as a high-severity issue with a CVSS score of 8.7. This flaw impacts all versions of the Pillow imaging library starting from 8.1.0 up to, but not including, 13.0.0. Security operations teams should prioritize updating these libraries to the latest release to mitigate the risk of service disruption.
In plain English
The Pillow library processes images for Python applications. In the affected versions, the software makes a mistake in how it handles animated PNG files, also known as APNGs. When opening a specific type of crafted image, Pillow reserves memory for the entire canvas size before checking if the file is a decompression bomb. This happens during the initial open command, before any actual image data is loaded or frames are iterated.
The background
According to the NVD record, the issue stems from CWE-789, a memory management error. An attacker can create an APNG with a small first frame but a very large declared canvas size. If the file uses background disposal or the OP_PREVIOUS flag, the library allocates the full memory space prematurely. This allows an attacker to exhaust available memory on a server, causing a denial of service condition without needing to trick the application into processing heavy pixel data.
What changes now
The vendor has released version 13.0.0, which contains the fix for this issue. The update corrects the order of operations, ensuring that decompression-bomb checks occur before the full canvas memory allocation. Users of older versions are vulnerable to this specific denial-of-service attack vector. Organizations should plan their updates to move to version 13.0.0 or later as soon as possible to protect their infrastructure from memory exhaustion attacks.
Who needs to act first
Teams usually prioritize systems that accept untrusted image uploads from the internet. Check whether your web applications use Pillow to process user-submitted content. If you cannot update immediately, consider restricting file types or using a proxy to validate image dimensions before they reach the application. Back up your configuration files before making changes. Test the update in a staging environment to ensure compatibility with your existing codebase before rolling it out to production servers.
What to do and how to stay safe: Pillow
- Inventory all servers and containers running Python applications that depend on the Pillow library.
- Verify the installed version against the affected range to identify vulnerable instances.
- Apply the update to version 13.0.0 once testing confirms compatibility with your application.
- Monitor system memory usage after updating to ensure normal operation and detect any anomalies.
Step-by-step guide: 7 Configuration Errors That Expose Systems to Zero-Day Exploits
General security guidance from the Vuln Post newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
Which versions of Pillow are affected by this vulnerability?
Versions from 8.1.0 up to, but not including, 13.0.0 are affected by this memory exhaustion flaw.
Is there a patch available for CVE-2026-112399?
Yes, the issue is fixed in version 13.0.0 of the Pillow library.
What is the severity rating of this vulnerability?
The National Vulnerability Database rates this as a high severity issue with a CVSS score of 8.7.



