OpenEXR's Forged Unpacked Size can Lead to Heap-Based Buffer Overflow in Deep Scanline Parsing
Description
OpenEXR provides the specification and reference implementation of the EXR file format, an image storage format for the motion picture industry. In versions 3.3.2 through 3.3.0, there is a heap-based buffer overflow during a write operation when decompressing ZIPS-packed deep scan-line EXR files with a maliciously forged chunk header. This is fixed in version 3.3.3.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A heap-based buffer overflow in OpenEXR 3.3.0 to 3.3.2 allows remote code execution via a crafted ZIPS-packed deep scan-line EXR file.
Vulnerability
Description
CVE-2025-48071 is a heap-based buffer overflow vulnerability in OpenEXR, the reference implementation of the EXR image format widely used in the motion picture industry for high-dynamic-range imaging [1][2]. The flaw resides in the parsing of STORAGE_DEEP_SCANLINE chunks in ZIPS (Zlib Individual) compressed deep scan-line files [1]. When a maliciously forged chunk header supplies an oversized unpacked_size value, the undo_zip_impl function in src/lib/OpenEXRCore/internal_zip.c allocates insufficient buffer space for the decompressed data, leading to a heap-based buffer overflow during the subsequent write operation [3].
Attack
Vector
An attacker can exploit this vulnerability by crafting a specially designed EXR file containing a forged chunk header that specifies a large unpacked_size [3]. The victim must open the malicious file using an affected version of OpenEXR (3.3.0 through 3.3.2) [1]. No authentication is required; the attack vector is local as the file must be processed on the target system, but the file can be delivered via email, web downloads, or other sharing mechanisms [3]. Proof-of-concept code is publicly available [4], increasing the risk of exploitation.
Impact
Successful exploitation allows an attacker to trigger a heap-based buffer overflow, which can lead to arbitrary code execution in the context of the application processing the EXR file [1][3]. This could result in system compromise, data corruption, or denial of service, depending on how the library is integrated into host software [2][3].
Mitigation
The vulnerability is fixed in OpenEXR version 3.3.3 [1]. Users are strongly advised to upgrade immediately. No workarounds are documented; processing untrusted EXR files with affected versions should be avoided until the update is applied.
- NVD - CVE-2025-48071
- GitHub - AcademySoftwareFoundation/openexr: The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
- Heap-Based Buffer Overflow in Deep Scanline Parsing via Forged Unpacked Size
- poc/CVE-2025-48071 at main · ShielderSec/poc
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
OpenEXRPyPI | >= 3.3.0, < 3.3.3 | 3.3.3 |
Affected products
2- AcademySoftwareFoundation/openexrv5Range: >= 3.3.0, < 3.3.3
Patches
1916cc729e24afix potential buffer overwrite with zip data (#1974)
1 file changed · +1 −1
src/lib/OpenEXRCore/internal_zip.c+1 −1 modified@@ -298,7 +298,7 @@ undo_zip_impl ( if (res == EXR_ERR_SUCCESS) { decode->bytes_decompressed = actual_out_bytes; - if (comp_buf_size > actual_out_bytes) + if (comp_buf_size > actual_out_bytes || actual_out_bytes > uncompressed_size) res = EXR_ERR_CORRUPT_CHUNK; else internal_zip_reconstruct_bytes (
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-h45x-qhg2-q375ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-48071ghsaADVISORY
- github.com/AcademySoftwareFoundation/openexr/commit/916cc729e24aa16b86d82813f6e136340ab2876fghsax_refsource_MISCWEB
- github.com/AcademySoftwareFoundation/openexr/releases/tag/v3.3.3ghsax_refsource_MISCWEB
- github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-h45x-qhg2-q375ghsax_refsource_CONFIRMWEB
- github.com/ShielderSec/poc/tree/main/CVE-2025-48071ghsaWEB
News mentions
0No linked articles in our index yet.