PyPI: openexr

CVE-2025-64182

Safety vulnerability ID: SFTY-20260406-40737

Safety legacy ID: pyup.io-92077

Affected versions of the OpenEXR package are vulnerable to a Buffer Overflow due to an integer overflow and unchecked allocation in the legacy Python adapter. The InputFile.channel() and InputFile.channels() methods in PyOpenEXR_old.cpp compute a buffer size as typeSize * width * height without bounds checking, and the return value of the subsequent allocation is never validated before use, leading to a heap overflow on 32-bit systems or a NULL pointer dereference on 64-bit systems. An attacker who supplies a crafted EXR file with an extremely large dataWindow can trigger a crash or potentially achieve arbitrary code execution.

Created at: Apr 7, 2026Updated at: Apr 7, 2026

Overview

OpenEXR has buffer overflow in PyOpenEXR_old's channels() and channel()

Advisory

Affected versions of the OpenEXR package are vulnerable to a Buffer Overflow due to an integer overflow and unchecked allocation in the legacy Python adapter. The InputFile.channel() and InputFile.channels() methods in PyOpenEXR_old.cpp compute a buffer size as typeSize * width * height without bounds checking, and the return value of the subsequent allocation is never validated before use, leading to a heap overflow on 32-bit systems or a NULL pointer dereference on 64-bit systems. An attacker who supplies a crafted EXR file with an extremely large dataWindow can trigger a crash or potentially achieve arbitrary code execution.

Affected Package

Affecting openexr package, versions
>=3.2.0,<3.2.5
>=3.3.0,<3.3.6
>=3.4.0,<3.4.3

Also affects

---

How to Fix

Upgrade
openexr
to
3.2.5
3.3.6
3.4.3
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more