
Key points
- The flaw is identified as CVE-2026-112400 with a CVSS score of 8.7, rated as high severity.
- Affected software versions range from 9.2.0 through those prior to 13.0.0.
- A confirmed fix is available in version 13.0.0 of the library.
A vulnerability in the widely used Pillow imaging library for Python allows attackers to exhaust system memory using crafted GIF files. The issue affects versions from 9.2.0 until 13.0.0 and has been assigned the identifier CVE-2026-112400 with a high severity rating.
What happened
According to the National Vulnerability Database record, the flaw stems from how Pillow handles rejected GIF frame sizes during decompression. The library retains these dimensions even after a decompression-bomb exception is raised, specifically within the GifImageFile._seek method. This behaviour creates a persistent state where invalid size data remains stored in the image object.
If an application catches the resulting Image.DecompressionBombError and continues to process the same image object, subsequent operations become risky. Later seek or load actions allocate memory based on those previously rejected dimensions. This allocation can rapidly exhaust available system memory, leading to a denial of service condition for the affected application.
The issue is linked to weakness classes CWE-400 and CWE-770, indicating a resource management problem. The vendor has addressed this defect in version 13.0.0, which correctly handles the state after such exceptions are triggered.
Why it matters
Organisations relying on Pillow for image processing face potential service instability due to this resource exhaustion vector. Applications that implement error handling by catching decompression errors without discarding the image object remain vulnerable to further exploitation. This persistence allows the flaw to impact systems that might otherwise appear to handle malformed inputs safely.
The high severity rating of 8.7 reflects the ease with which an attacker can trigger memory exhaustion. Any service that processes untrusted GIF files using affected versions is at risk of being rendered unavailable. This makes the flaw particularly dangerous for web applications and content processing pipelines.
What happens next
- Verify whether your deployment uses Pillow versions greater than or equal to 9.2.0 and less than 13.0.0.
- Upgrade to version 13.0.0 or later to apply the confirmed fix for this memory exhaustion issue.
- Review error handling logic to ensure image objects are discarded after decompression errors occur.
- Monitor system resources for anomalous memory usage spikes following image processing tasks.
Patch priority
Teams usually prioritise systems that directly accept untrusted file uploads from external users. Check whether your application catches decompression errors and continues using the same image object, as this specific pattern triggers the flaw. Test the updated library version in a staging environment to ensure compatibility with your existing workflows. Back up your configuration before rolling out the update to production systems to allow for rapid rollback if issues arise.
What to do and how to stay safe: Pillow
- Audit your dependency tree to identify all instances of Pillow versions between 9.2.0 and 13.0.0.
- Implement strict error handling that discards image objects immediately after a decompression error.
- Monitor system memory usage closely for services that process user-supplied GIF files.
- Plan an upgrade path to version 13.0.0 once the vendor provides an update for your specific environment.
Step-by-step guide: Patch Management: Definition, Purpose and Operational Reality
General security guidance from the AppSec Scoop newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
What is the CVSS score for CVE-2026-112400?
The CVSS score is 8.7, which is rated as high severity.
Which versions of Pillow are affected by this vulnerability?
Versions from 9.2.0 until 13.0.0 are affected by this issue.
Is there a fix available for this memory exhaustion flaw?
Yes, the issue is fixed in version 13.0.0 of the Pillow library.



