---
id: CVE-2026-96637
title: >-
  Pillow: Decompression bomb check bypass in SpiderImagePlugin.seek() leads to
  unbounded allocation DoS
summary: >-
  Pillow is a Python imaging library. Prior to 13.0.0, SpiderImageFile.seek() in
  src/PIL/SpiderImagePlugin.py reparses a later SPIDER stack frame and replaces
  self._size without rerunning Image._decompression_bomb_check(). A tiny file
  can …
severity: high
cvss: 7.1
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'
cvssSource: cna
cwe:
  - CWE-400
  - CWE-409
vendor: python-pillow
product: Pillow
affected:
  - Pillow < 13.0.0
published: '2026-10-21'
updated: '2026-10-21'
sourceUpdated: '2026-10-21T21:01:20.249Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-96637'
references:
  - url: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-g842-9rc4-69pw
    label: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-g842-9rc4-69pw
  - url: 'https://github.com/python-pillow/Pillow/pull/10076'
    label: 'https://github.com/python-pillow/Pillow/pull/10076'
  - url: >-
      https://github.com/python-pillow/Pillow/commit/7cb0e02389d8aac2a60896a490f572db0b07b841
    label: >-
      https://github.com/python-pillow/Pillow/commit/7cb0e02389d8aac2a60896a490f572db0b07b841
  - url: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
    label: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
tags:
  - cve.org
ingestedAt: '2026-10-21T22:18:33.801Z'
---

## Overview

Pillow is a Python imaging library. Prior to 13.0.0, SpiderImageFile.seek() in src/PIL/SpiderImagePlugin.py reparses a later SPIDER stack frame and replaces self._size without rerunning Image._decompression_bomb_check(). A tiny file can use a safe first frame to pass Image.open() and then declare very large dimensions in a later mode F frame. Loading that frame allocates approximately four bytes per attacker-declared pixel and can consume multiple gigabytes of memory. This issue is fixed in version 13.0.0.

## Affected

- `Pillow < 13.0.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
