Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pillow-heif

Latest version: v1.9.0

Overview

Last scanned
25 Nov 2026
Published
24 Nov 2026
PyPI package Publisher: andrey18106, bigcat88
309 Stars
28 Forks
2 Versions
35.8M Downloads
Python Repo language

Scan summary

pillow-heif was last scanned on 25 Nov 2026 at version 1.9.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 24 Nov 2026.
  • Findings: No rules fired in version 1.9.0.
  • Downloads: 35,789,345 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.9.0 LATEST 24 Nov 2026 No rules fired
1.8.1 11 Oct 2026 No rules fired

No rules fired in 1.9.0

Findings

Findings for v1.9.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.9.0; other versions have their own rules, not their own score.

Known vulnerabilities

1 CVE · last 27 Feb 2026

0 CRITICAL 0 HIGH 1 MEDIUM 0 LOW

Versions

  • ≥ 1.3.0
  • < 1.3.0 1 MEDIUM

Vulnerabilities

  • CVE-2026-28231 Medium 27 Feb 2026 pillow-heif: Integer Overflow in Encode Path Buffer Validation Leads to Heap Out-of-Bounds Read Fixed in 1.3.0

README

The publisher’s own README, as collected from the registry.

pillow-heif

Test Wheels

PythonVersion impl pypi

Mac OS Windows Linux Alpine Linux Raspberry Pi

Python bindings to libheif for working with HEIF images and plugin for Pillow.

Features:

  • Decoding of 8, 10, 12 bit HEIC files.
  • Encoding of 8, 10, 12 bit HEIC files.
  • EXIF, XMP, IPTC read & write support.
  • Support of multiple images in one file and a PrimaryImage attribute.
  • Adding & removing thumbnails.
  • Grid(tiled) image encoding, like Apple devices do.
  • Reading of Depth Images.
  • (beta) Reading of Auxiliary Images by johncf
  • Adding HEIF support to Pillow in one line of code as a plugin.

[!WARNING] The lightweight variant pi-heif is discontinued. Version 1.4.0 is its final release and will not receive further updates. Its prebuilt wheels bundle libheif 1.23.0, which is affected by CVE-2026-84383, a heap buffer overflow that can be triggered by decoding a crafted HEIC file. If you decode untrusted HEIC/HEIF files, migrate to the latest pillow-heif release. Its prebuilt wheels include a libheif version that fixes this vulnerability.

Install
python3 -m pip install -U pip
python3 -m pip install pillow-heif
Example of use as a Pillow plugin
from PIL import Image
from pillow_heif import register_heif_opener

register_heif_opener()

im = Image.open("image.heic")  # do whatever need with a Pillow image
im = im.rotate(13)
im.save(f"rotated_image.heic", quality=90)
16 bit PNG to 10 bit HEIF using OpenCV
import cv2
import pillow_heif

cv_img = cv2.imread("16bit_with_alpha.png", cv2.IMREAD_UNCHANGED)
heif_file = pillow_heif.from_bytes(
    mode="BGRA;16",
    size=(cv_img.shape[1], cv_img.shape[0]),
    data=bytes(cv_img)
)
heif_file.save("RGBA_10bit.heic", quality=-1)
8/10/12 bit HEIF to 8/16 bit PNG using OpenCV
import numpy as np
import cv2
import pillow_heif

heif_file = pillow_heif.open_heif("image.heic", convert_hdr_to_8bit=False, bgr_mode=True)
np_array = np.asarray(heif_file)
cv2.imwrite("image.png", np_array)
Accessing decoded image data
import pillow_heif

if pillow_heif.is_supported("image.heic"):
    heif_file = pillow_heif.open_heif("image.heic", convert_hdr_to_8bit=False)
    print("image size:", heif_file.size)
    print("image mode:", heif_file.mode)
    print("image data length:", len(heif_file.data))
    print("image data stride:", heif_file.stride)
Get decoded image data as a Numpy array
import numpy as np
import pillow_heif

if pillow_heif.is_supported("input.heic"):
    heif_file = pillow_heif.open_heif("input.heic")
    np_array = np.asarray(heif_file)
Accessing Depth Images
from PIL import Image
from pillow_heif import register_heif_opener
import numpy as np

register_heif_opener()

im = Image.open("../tests/images/heif_other/pug.heic")
if im.info["depth_images"]:
    depth_im = im.info["depth_images"][0]  # Access the first depth image (usually there will be only one).
    # Depth images are instances of `class HeifDepthImage(BaseImage)`,
    # so work with them as you would with any usual image in pillow_heif.
    # Depending on what you need the depth image for, you can convert it to a NumPy array or convert it to a Pillow image.
    pil_im = depth_im.to_pillow()
    np_im = np.asarray(depth_im)
    print(pil_im)
    print(pil_im.info["metadata"])
More Information
Wheels
Wheels table macOSIntel macOSSilicon Windows* musllinux* manylinux*
CPython 3.11 ✅ ✅ ✅ ✅ ✅
CPython 3.12 ✅ ✅ ✅ ✅ ✅
CPython 3.13 ✅ ✅ ✅ ✅ ✅
CPython 3.14 ✅ ✅ ✅ ✅ ✅
CPython 3.14t ✅ ✅ ✅ ✅ ✅
CPython 3.15 ✅ ✅ ✅ ✅ ✅
CPython 3.15t ✅ ✅ ✅ ✅ ✅
PyPy 3.11 v8.0 ✅ ✅ ✅ N/A ✅
PyPy 3.12 v8.0 ✅ ✅ ✅ N/A ✅

* x86_64, aarch64 wheels.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases pillow-heif

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229