Vulnerabilities

Security fix · CVE-2026-112401

Pillow is a Python imaging library.

Published Oct 19, 2026 · catalog updated Oct 26, 2026 · Pillow is a Python

Last checked Oct 31, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-112401. EPSS is 0.65%. Act only if a listed version of Pillow is a Python is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
Medium6.9
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.65%
Remediation
Version ranges on file
Affected products
Bitnami pillow · PyPI pillow · pip Pillow · pypi pillow

Opening a crafted GIF file with takes time that grows with the square of the file's size, so anyone who can submit an image to a service that uses Pillow can keep one worker busy at full processor load for a long time with a small file. A 2 MB file takes about 5 seconds to open, a 4 MB file about 35 seconds, and an 8 MB file about 3 minutes. An ordinary GIF of the same size opens in well under a second. The cost is paid inside itself, with default settings, before the application has seen the image's size or format. The bug is in in , which builds by appending to an immutable object with no size limit. It appends once per 255-byte sub-block ( , line 261) and once per comment extension ( , line 266). Each append copies everything collected so far. A file made of many tiny comment extensions forces a full re-copy for each one. Because ends with , any code that only opens an uploaded file to identify it, read its dimensions, or make a thumbnail pays the full cost. The decompression-bomb check does not help, since the image is 1×1. Memory use stays linear, so the effect is processor exhaustion and latency, bounded by whatever upload size the service allows (about 1 second at 1 MB). This is the same kind of issue as the EPS open-phase slowdown fixed as CVE-2021-28677, here in the GIF comment handling. The quadratic pattern was introduced in commit b2b737b68b06 ("Allow arbitrary number of comment extension subblocks", November 2018) and has shipped since Pillow 5.4.0. The attached script builds 2 MB and 4 MB test files and compares each against a byte-identical control whose extensions are labelled as plain text instead of comment. The 4 MB comment file took about 34 seconds to open, against 0.26 seconds for its control. A patch that collects the pieces in a list and joins them once is also attached. ## Details collects GIF comment extensions into using concatenation, once per 255-byte sub-block and once per comment extension, with no limit on the total. is immutable, so

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • Bitnami pillow5.4.0 → 13.0.0
  • PyPI pillow5.4.0 → 13.0.0
  • pip Pillow>= 5.4.0, < 13.0.0
  • pypi pillowversion unspecified

How to fix CVE-2026-112401

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-112401. EPSS is 0.65%. Act only if a listed version of Pillow is a Python is installed.

Which versions are affected?

Compare what you have installed with Pillow >= 5.4.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-407. EPSS 0.65%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Technology hubs

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 19, 2026 · NIST NVD

    Detected

    Pillow is a Python imaging library. From 5.4.0 until 13.0.0, Pillow performs quadratic copying while parsing GIF comments. GifImageFile._seek() repeatedly appends immutable bytes for comment sub-blocks and multiple comment extensions, and frame zero is parsed during Image.open(). An attacker can submit a small-dimension GIF containing many comment extensions to any application that opens the file.

  2. Oct 20, 2026 · NIST NVD

    Updated

    Pillow is a Python imaging library. From 5.4.0 until 13.0.0, Pillow performs quadratic copying while parsing GIF comments. GifImageFile._seek() repeatedly appends immutable bytes for comment sub-blocks and multiple comment extensions, and frame zero is parsed during Image.open(). An attacker can submit a small-dimension GIF containing many comment extensions to any application that opens the file.

  3. Oct 20, 2026 · NIST NVD

    Updated

    Pillow is a Python imaging library. From 5.4.0 until 13.0.0, Pillow performs quadratic copying while parsing GIF comments. GifImageFile._seek() repeatedly appends immutable bytes for comment sub-blocks and multiple comment extensions, and frame zero is parsed during Image.open(). An attacker can submit a small-dimension GIF containing many comment extensions to any application that opens the file.

  4. Oct 21, 2026 · GitHub Advisory Database

    Updated

    Opening a crafted GIF file with takes time that grows with the square of the file's size, so anyone who can submit an image to a service that uses Pillow can keep one worker busy at full processor load for a long time with a small file. A 2 MB file takes about 5 seconds to open, a 4 MB file about 35 seconds, and an 8 MB file about 3 minutes. An ordinary GIF of the same size opens in well under a s

  5. Oct 26, 2026 · GitHub Advisory Database

    Fix available

    pillow fixed in 13.0.0

  6. Oct 26, 2026 · GitHub Advisory Database

    Fix available

    pillow fixed in 13.0.0

  7. Oct 26, 2026 · GitHub Advisory Database

    Updated

    Pillow is a Python imaging library. From 5.4.0 until 13.0.0, Pillow performs quadratic copying while parsing GIF comments. GifImageFile._seek() repeatedly appends immutable bytes for comment sub-blocks and multiple comment extensions, and frame zero is parsed during Image.open(). An attacker can submit a small-dimension GIF containing many comment extensions to any application that opens the file.

Sources

  • CVE.orgVulnerability recordCVE-2026-112401

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-112401

    30-day exploitation probability 0.65%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-74r2-7ff9-mjj2

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • GitLab Advisory DatabasePackage advisoryCVE-2026-112401

    ============================================================================ Quadratic GIF comment concatenation allows DoS in Image.open() Location: src/PIL/GifImagePlugin.py:266 in GifImageFile._seek() Commit: a707c6b21c313880d0771e54965d142dd42358b6 ============================================================================ Opening a crafted GIF file with Image.open() takes time that grows wit

    advisories.gitlab.com
  • NIST NVDVulnerability recordCVE-2026-112401

    Pillow is a Python imaging library. From 5.4.0 until 13.0.0, Pillow performs quadratic copying while parsing GIF comments. GifImageFile._seek() repeatedly appends immutable bytes for comment sub-blocks and multiple comment extensions, and frame zero is parsed during Image.open().

    nvd.nist.gov
  • OpenSSF OSV / OSV ScannerPackage advisoryBIT-pillow-2026-112401

    Pillow: Quadratic GIF comment concatenation allows DoS in Image.open()

    osv.dev
  • PyPA Advisory DatabasePackage advisoryGHSA-74r2-7ff9-mjj2

    Pillow: Quadratic GIF comment concatenation allows DoS in Image.open()

    osv.dev

References

Freshness

Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSOct 31, 2026
  • GitHub Advisory DatabaseOct 26, 2026
  • OpenSSF OSV / OSV ScannerOct 26, 2026
  • PyPA Advisory DatabaseOct 26, 2026
  • GitLab Advisory DatabaseOct 23, 2026
  • CVE.orgOct 21, 2026
  • NIST NVDOct 21, 2026