PyPI: openexr

CVE-2026-26981

Safety vulnerability ID: SFTY-20260406-34412

Safety legacy ID: pyup.io-92079

Affected versions of the OpenEXR package are vulnerable to a Heap Buffer Overflow due to a signed-to-unsigned integer conversion error in the memory-mapped stream reading path. The istream_nonparallel_read function in ImfContextInit.cpp computes a clamped read size by subtracting the projected end offset from the stream size, but when the projected end exceeds the stream size, the result is a negative int64_t value that is implicitly converted to a massive size_t value and passed to memcpy. An attacker who supplies a crafted EXR file can trigger an out-of-bounds heap read, resulting in a crash and Denial of Service.

Created at: Apr 17, 2026Updated at: Apr 17, 2026

Overview

OpenEXR has heap-buffer-overflow via signed integer underflow in ImfContextInit.cpp

Advisory

Affected versions of the OpenEXR package are vulnerable to a Heap Buffer Overflow due to a signed-to-unsigned integer conversion error in the memory-mapped stream reading path. The istream_nonparallel_read function in ImfContextInit.cpp computes a clamped read size by subtracting the projected end offset from the stream size, but when the projected end exceeds the stream size, the result is a negative int64_t value that is implicitly converted to a massive size_t value and passed to memcpy. An attacker who supplies a crafted EXR file can trigger an out-of-bounds heap read, resulting in a crash and Denial of Service.

Affected Package

Affecting openexr package, versions
>=3.3.0,<3.3.7
>=3.4.0,<3.4.5

Also affects

---

How to Fix

Upgrade
openexr
to
3.3.7
3.4.5
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