PyPI: openexr

CVE-2025-64183

Safety vulnerability ID: SFTY-20260406-66229

Safety legacy ID: pyup.io-92078

Affected versions of the OpenEXR package are vulnerable to a Use After Free due to improper reference counting in the legacy Python adapter. The PyObject_StealAttrString helper function in PyOpenEXR_old.cpp obtains a new reference via PyObject_GetAttrString, immediately decrements the reference count, and returns the now-dangling pointer, which callers then pass to APIs such as PyLong_AsLong and PyFloat_AsDouble. An attacker who supplies a crafted Python object as a parameter to methods like InputFile.channel() can trigger a segmentation fault or potentially achieve arbitrary code execution through heap manipulation.

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

Overview

OpenEXR has use after free in PyObject_StealAttrString

Advisory

Affected versions of the OpenEXR package are vulnerable to a Use After Free due to improper reference counting in the legacy Python adapter. The PyObject_StealAttrString helper function in PyOpenEXR_old.cpp obtains a new reference via PyObject_GetAttrString, immediately decrements the reference count, and returns the now-dangling pointer, which callers then pass to APIs such as PyLong_AsLong and PyFloat_AsDouble. An attacker who supplies a crafted Python object as a parameter to methods like InputFile.channel() can trigger a segmentation fault or potentially achieve arbitrary code execution through heap manipulation.

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