VAITP Dataset

← Back to the dataset

CVE-2026-96636

Memory‑exhaustion DoS via crafted multi‑frame images bypassing decompression checks.

  • CVSS 6.5
  • CWE-400
  • Resource Management
  • Remote

Pillow is a Python imaging library. Prior to 13.0.0, MpoImageFile.seek() and DcxImageFile.seek() reparse later MPO or DCX frames and replace self._size without rerunning Image._decompression_bomb_check(). A crafted multi-frame image can use a tiny first frame to pass Image.open() and then declare an over-limit later frame. Normal frame iteration through seek(), load(), or ImageSequence.Iterator can decode that frame and commit hundreds of megabytes or more, causing memory-exhaustion denial of service. This issue is fixed in version 13.0.0.

CVSS base score
6.5
Published
2026-10-21
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Algorithm
Code defect classification
Missing Check
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
Pillow
Fixed by upgrading
Yes

Solution

Upgrade Pillow to version 13.0.0 or later.

Vulnerable code sample

from PIL import Image

def process_image(path):
    img = Image.open(path)                 # VULNERABLE: skips bomb check on later frames
    img.load()                             # loads first (tiny) frame, passes bomb check
    frame = 0
    try:
        while True:
            img.seek(frame)                # reparse next frame without size check
            img.load()                     # may allocate huge memory
            frame += 1
    except EOFError:
        pass

Patched code sample

from PIL import Image

def process_image(path):
    img = Image.open(path)                 # FIX: enforce bomb check on each frame
    img.load()
    img._decompression_bomb_check()        # ensure first frame is within limits
    frame = 0
    try:
        while True:
            img.seek(frame)                # reparse next frame
            img._decompression_bomb_check()# re‑run size validation for each frame
            img.load()
            frame += 1
    except EOFError:
        pass

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve202696636,
  title        = {{Memory‑exhaustion DoS via crafted multi‑frame images bypassing decompression checks.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-96636},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-96636/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.