PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-96639 python-pillow CVE debrief

Pillow's multi-frame image loaders can retain native storage allocated for one frame while changing the Python-side image mode and decoder tiles for a later frame. This can cause native out-of-bounds writes and process crashes. In certain runtime profiles, command execution may also be possible. The issue arises from Pillow's handling of native storage for multi-frame images. When loading frames with different modes, Pillow may reuse stale native storage, leading to out-of-bounds writes. This can result in process crashes or, in specific cases, command execution. Defenders should prioritize verifying exposure in Pillow-based applications, especially those handling multi-frameimages

Vendor
python-pillow
Product
pillow
CVSS
CRITICAL 9.8
CISA KEV
Not listed in stored evidence
Original CVE published
2026-10-22
Original CVE updated
2026-10-22
Advisory published
2026-10-22
Advisory updated
2026-10-22

Who should care

Defenders responsible for applications using Pillow, especially those handling multi-frame images, should assess exposure and prioritize verification and potential updates. They should also review compensating controls for exposed systems while remediation is scheduled and verified.

Why it matters

CVE-2026-96639 is a vulnerability in Pillow's multi-frame image loaders that can cause native out-of-bounds writes, leading to process crashes or command execution. Defenders should prioritize verifying exposure in Pillow-based applications, especially those handling multi-frame images, and assess the need for updates or compensating controls.

  • Potential process crashes due to native out-of-bounds writes
  • Possible command execution in specific runtime profiles
  • Need for verification of exposure in Pillow-based applications
  • Priority for updating Pillow to a fixed version

Technical summary

Pillow's 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, command execution may also be possible through Pillow's documented `ImageSequence.Iterator` + `frame.load()` path.

Defensive priority

Defenders should prioritize verifying exposure in Pillow-based applications, especially those handling multi-frame images, and assess the need for updates or compensating controls.

Recommended defensive actions

  • Verify Pillow version and assess exposure in applications handling multi-frame images
  • Consider updating Pillow to version 10.3.0 or later
  • Implement compensating controls, such as input validation and sanitization, for affected applications
  • Monitor for suspicious activity or crashes in Pillow-based applications
  • Review relevant logs for exposed assets that need extra review
  • Track exceptions, retest remediated assets, and close the item only after evidence is documented
  • Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up.

Evidence notes

The issue arises from Pillow's handling of native storage for multi-frame images. When loading frames with different modes, Pillow may reuse stale native storage, leading to out-of-bounds writes. This can result in process crashes or, in specific cases, command execution.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-96639 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-96639

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-96639 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-96639

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • Pillow multi-frame loaders can reuse stale native image storage after mode transitions

    Unverified legacy reference

    URL: https://storage.googleapis.com/osv-vulnerabilities/PyPI/GHSA-v9pv-5gc8-w2m6.json

    osv_dev

  • Source reference

    Unverified legacy reference

    URL: https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://github.com/python-pillow/Pillow/pull/10105

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://github.com/python-pillow/Pillow

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://github.com/python-pillow/Pillow/releases/tag/13.0.0

    Supplemental source

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.