---
schema_version: '1.0'
id: security-20261024-a9061e
title: 'CVE-2026-114501: Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT
  > 1'
url: https://osv.dev/vulnerability/GHSA-654x-cwwv-5j9c
url_hash: a9061e14bfb17584c599f79c0e89da87070cc9558c4493cfdd9ee71df20e3aba
canonical_url: https://osv.dev/vulnerability/GHSA-654x-cwwv-5j9c
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-114501
- GHSA-654x-cwwv-5j9c
- severity:CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
- pillow
- PyPI
lang: en
published_at: '2026-10-23T21:53:21Z'
fetched_at: '2026-10-24T12:01:08.289353Z'
updated_at: '2026-10-24T12:35:59Z'
status: published
content_hash: 2c7d0970ec10981af2920dbc80c272aa4fcc9650bc9fb38eeb40a4b64b049505
content_changed_at: null
license_note: full
summary: 'Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1'
summary_source: rss
summary_en: 'Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT >
  1'
summary_omitted_reason: null
redistribution: true
keywords_en:
- Arrow
- cve
- CVE-2026-114501
- export
- GHSA-654x-cwwv-5j9c
- heap
- leaks
- library vulnerability
- memory
- NEVExports
- pillow
- PILLOW_ALIGNMENT
- PyPI
- severity:CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
- Shay McVeigh
- software security
- stale
- when
entities_en:
- name: NEVExports
  type: event
- name: Shay McVeigh
  type: person
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: Shay McVeigh
  type: person
- name: NEVExports
  type: event
key_facts: []
related: []
related_auto:
- name: Bristol Crown Court
  type: organization
  weight: 1.0
- name: Bristol Magistrates Court
  type: organization
  weight: 1.0
computed_at: '2026-10-24T12:35:16Z'
---

# CVE-2026-114501: Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1

## TL;DR
Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1

## Key Points
- cve / CVE-2026-114501 / GHSA-654x-cwwv-5j9c / severity:CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N / pillow / PyPI

## Details
**Severity:** CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
**Advisory:** GHSA-654x-cwwv-5j9c (CVE-2026-114501)

**Details:**
### Summary

When [`PILLOW_ALIGNMENT`](https://pillow.readthedocs.io/en/stable/reference/block_allocator.html#memory-pools) is set above 1, exporting an image to Arrow returns uninitialized heap memory mixed in with the pixel data. That memory can include pixels from images the process freed earlier. 

### Details

With an alignment above 1, the default allocator pads each row up to `aligned_linesize` and starts the first row at an aligned offset into the block. It then exports `im->blocks[0].ptr` as `xsize * ysize` tightly packed pixels, so exported data includes the padding bytes, and can include a few bytes from before the first row.

Tested vulnerable on 11.2.1, 12.3.0, 4c1ed27a5.

### PoC

Whether things leak may depend on allocator configuration. This does show a leak on my Mac.

```python
import os

os.environ["PILLOW_ALIGNMENT"] = "64"

from PIL import Image

# Image A: 64 px wide, so its rows fill the whole aligned stride
a = Image.new("L", (64, 40), 0x41).transpose(Image.Transpose.FLIP_LEFT_RIGHT)
del a

# Image B: 61 px wide, so each row has 3 bytes of padding; its pixels are all 0
b = Image.new("L", (61, 40), 0).transpose(Image.Transpose.FLIP_LEFT_RIGHT)

try:
    exported = Image.fromarrow(b, b.mode, b.size).tobytes()
except ValueError as e:
    print("Not vulnerable:", e)
else:
    if leaked := len(exported) - exported.count(0):
        raise RuntimeError(f"{leaked} of {len(exported)} exported bytes are not B's pixels")
```

### Impact

Information disclosure for applications that set `PILLOW_ALIGNMENT` and export images to Arrow. Likely any image whose row length isn't a multiple of the alignment will do. In a service handling several users' images, one user's exported data can contain pixels from another user's image, or other stale heap contents.

**References:**
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-654x-cwwv-5j9c
- https://nvd.nist.gov/vuln/detail/CVE-2026-114501
- https://github.com/python-pillow/Pillow/pull/10172
- https://github.com/python-pillow/Pillow/commit/19f64946eb247b973dd4560be7dea3bf979d2e6a
- https://github.com/python-pillow/Pillow
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-654x-cwwv-5j9c_

## Source
元記事: [CVE-2026-114501: Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1](https://osv.dev/vulnerability/GHSA-654x-cwwv-5j9c) — published 2026-10-23T21:53:21Z
