Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Pillow
  4. ›
  5. CVE-2026-96639

CVE-2026-96639: Pillow multi-frame loaders can reuse stale native image storage after mode transitions

October 22, 2026

Pillow multi-frame image loaders can retain native ImagingCore storage allocated for one frame while changing the Python-side image mode and decoder tiles for a later frame.

If frame 0 allocates storage for a narrow mode such as L, and a later frame of the same dimensions switches to a wider mode such as RGB or CMYK, Pillow may decode wider pixels into the stale narrow native buffer. This causes native out-of-bounds writes and process crashes. In the MPO/JPEG path, I also demonstrated command execution in matching Python/Pillow runtime profiles through Pillow’s documented ImageSequence.Iterator + frame.load() path.

References

  • github.com/advisories/GHSA-v9pv-5gc8-w2m6
  • github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a
  • github.com/python-pillow/Pillow/pull/10105
  • github.com/python-pillow/Pillow/releases/tag/13.0.0
  • github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6
  • nvd.nist.gov/vuln/detail/CVE-2026-96639

Code Behaviors & Features

Detect and mitigate CVE-2026-96639 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 11.0.0 before 13.0.0

Fixed versions

  • 13.0.0

Solution

Upgrade to version 13.0.0 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read
  • CWE-787: Out-of-bounds Write

Source file

pypi/Pillow/CVE-2026-96639.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:38 +0000.