Intel

AIKIDO-2026-866843

pillow-heif is vulnerable to Out-of-bounds Read

Out-of-bounds ReadGHSA-ccw6-q225-c975 Published Yesterday

44

Medium Risk

This Affects:

PYTHONpillow-heif
0.0.1 - 1.6.0
Fixed in 1.7.0
Are you affected? Scan for Free

TL;DR

The C encoder in _pillow_heif.c checks a plane buffer against stride_in * height, but _CtxWriteImage_add_plane copies real_stride bytes per row. When encode() is called with a stride smaller than the actual row width, the copy reads past the end of the buffer, crashing the process and copying adjacent heap memory into the output image. The fix rejects non-positive dimensions and any stride_in smaller than real_stride before copying.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you pass raw plane data with a caller controlled stride to the encoder.

Background info

pillow-heif is vulnerable to Out-of-bounds Read in versions 0.0.1 - 1.6.0.

How to fix this

Upgrade the pillow-heif library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform