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

Published Oct 21, 2026
·
Updated

Summary

When PILLOWALIGNMENT 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 alignedlinesize 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["PILLOWALIGNMENT"] = "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.FLIPLEFTRIGHT) 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.FLIPLEFTRIGHT)

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 PILLOWALIGNMENT 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.

Other sources

Pillow is a Python imaging library. From 11.2.1 until 13.0.0, Arrow export assumes that an image's rows are tightly contiguous and exports from im->blocks[0].ptr even when PILLOWALIGNMENT makes alignedlinesize include row padding or an aligned offset before the first row. The resulting Arrow buffer can include uninitialized padding, bytes preceding the first row, or stale heap contents from previously freed images. Applications that configure alignment and export images to Arrow can therefore disclose one user's pixels or other process memory to another user. This issue is fixed in version 13.0.0.

— Ubuntu

Pillow is a Python imaging library. From 11.2.1 until 13.0.0, Arrow export assumes that an image's rows are tightly contiguous and exports from im-blocks[0].ptr even when PILLOWALIGNMENT makes alignedlinesize include row padding or an aligned offset before the first row. The resulting Arrow buffer can include uninitialized padding, bytes preceding the first row, or stale heap contents from previously freed images. Applications that configure alignment and export images to Arrow can therefore disclose one user's pixels or other process memory to another user. This issue is fixed in version 13.0.0.

— IBM

Affected Software

14 affected componentsFixes available
pypi/Pillow>=11.2.1<13.0.0
pip/pillow>=11.2.1<13.0.0
13.0.0
bitnami/pillow>=11.2.1<13.0.0
13.0.0
pip/pillow>=11.2.1<13.0.0
13.0.0
debian/pillow<=9.4.0-1.1+deb12u1, <=11.1.0-5+deb13u4, <=11.1.0-5+deb13u3, <=12.3.0-1
13.0.0-1
Python Pillow>=11.2.1<13.0.0
debian/pillow*
debian/pillow*
debian/pillow*
ubuntu/pillow-python2*
ubuntu/pillow*
ubuntu/pillow*
IBM App Connect Operator<=CD: 12.1.0 - 12.21.0 12.0 LTS: 12.0.0 - 12.0.28 13 LTS: 13.0.0 - 13.6.0
IBM App Connect EnterpriseCertified Containers Operands<=CD: 12.0.11.1-r1 - 12.0.12.5-r1, 13.0.1.0-r1 - 13.0.6.2-r1 12.0 LTS: 12.0.12-r1 - 12.0.12-r28 13 LTS: 13.0.7.0-r1 - 13.0.9.0-r1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0
  2. Upgrade

    Upgrade bitnami/pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0
  3. Upgrade

    Upgrade pip/pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0
  4. Upgrade

    Upgrade debian/pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0-1
  5. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 21, 2026
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·09:17 PM
Data Sourced
via MITRE·09:17 PM
DescriptionWeakness
Data Sourced
via OSV·09:17 PM
DescriptionSeverityWeakness
Advisory Published
via OSV·10:16 PM
Data Sourced
via NVD·10:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 23, 2026
Advisory Published
via GitHub·09:53 PM
Data Sourced
via GitHub·09:53 PM
DescriptionWeaknessAffected Software
Nov 9, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Nov 12, 2026
Data Sourced
via OSV·11:46 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

Which deployments are exposed to this disclosure?

Applications using Pillow versions from 11.2.1 up to, but not including, 13.0.0 are affected when they configure PILLOW_ALIGNMENT greater than 1 and export images to Arrow. The impact is disclosure of image data from another user or other stale process memory.

2

What must happen for an attacker to obtain leaked data?

The application must export an image to Arrow while aligned row sizes or offsets cause the image storage not to be tightly contiguous. The exported buffer may then contain uninitialized row padding, bytes before the first image row, or stale heap contents from previously freed images.

3

Is the default configuration affected?

The described condition requires PILLOW_ALIGNMENT to be greater than 1. The provided information does not indicate that deployments using the default alignment setting are affected.

4

What is the remediation?

Upgrade Pillow to version 13.0.0, which fixes the issue. If an immediate upgrade is not possible, avoid configuring PILLOW_ALIGNMENT greater than 1 or avoid exporting affected images to Arrow.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203