CVE-2025-48074: OpenEXR OpenEXR Out-Of-Memory Vulnerability

MODERATE
Advisory Identifier: GHSA-x22w-82jp-8rvf
CWE-770
Published
Advisory Summary

CVE-2025-48074 is a MODERATE openexr out-of-memory vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting OpenEXR libraries in the PyPI ecosystem. The issue involves openexr out-of-memory via unbounded file header values. Remediation is available by upgrading affected packages to version 3.3.3.

CVE-2025-48074 at a Glance

CVE Identifier CVE-2025-48074
GHSA Identifier GHSA-x22w-82jp-8rvf
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product OpenEXR
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-48074

To remediate this vulnerability, upgrade all affected OpenEXR dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

OpenEXR fixed: 3.3.3
pip install OpenEXR>=3.3.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show OpenEXR

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-48074, inspect your installed packages using pip:

pip show OpenEXR

Analyze the terminal output to locate any version of OpenEXR in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.3), your application is affected.

Note: The pip show OpenEXR command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In OpenEXR, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The OpenEXR file format defines many information about the final image inside of the file header, such as the size of data/display window. The application trusts the value of `dataWindow` size provided in the header of the input file, and performs computations based on this value. This may result in unintended behaviors, such as excessively large number of iterations and/or huge memory allocations. ### Details A concrete example of this issue is present in the function `readScanline()` in `ImfCheckFile.cpp` at line 235, that performs a for-loop using the `dataWindow min.y` and `max.y` coordinates that can be arbitrarily large. ```cpp in.setFrameBuffer (i); int step = 1; // // try reading scanlines. Continue reading scanlines // even if an exception is encountered // for (int y = dw.min.y; y <= dw.max.y; y += step) // <-- THIS LOOP IS EXCESSIVE BECAUSE OF DW.MAX { try { in.readPixels (y); } catch (...) { threw = true; // // in reduceTime mode, fail immediately - the file is corrupt // if (reduceTime) { return threw; } } } ``` Another example occurs in the `EnvmapImage::resize` function that in turn calls `Array2D<T>::resizeEraseUnsafe` passing the `dataWindow` X and Y coordinates and perform a huge allocation. On some system, the allocator will simply return `std::bad_alloc` and crash. On other systems such as macOS, the allocator will happily continue with a "small" pre-allocation and allocate further memory whenever it is accessed. This is the case with the `EnvmapImage::clear` function that is called right after and fills the image RGB values with zeros, allocating tens of Gigabytes. ### PoC NOTE: please download the `oom_crash.exr` file via the following link: https://github.com/ShielderSec/poc/tree/main/CVE-2025-48074 1. Compile the `exrcheck` binary in a macOS or GNU/Linux machine with ASAN. 2. Open the `oom_crash.exr` file with the following command: ``` exrcheck oom_crash.exr ``` 3. Notice that `exrenvmap`/`exrcheck` crashes with ASAN stack-trace. ### Impact An attacker could cause a denial of service by stalling the application or exhaust memory by stalling the application in a loop which contains a memory leakage.

CVE-2025-48074 Affected OpenEXR Versions

1 component(s)
Fixed Versions:
3.3.3
Product / Package Ecosystem Affected Versions Fixed Version
OpenEXR
PyPI
≥ 3.3.2
< 3.3.3
All 1 versions
3.3.2
3.3.3

References

Frequently Asked Questions

What is CVE-2025-48074?
CVE-2025-48074 is a security vulnerability in OpenEXR involving OpenEXR Out-Of-Memory via Unbounded File Header Values under CWE-770: Allocation of Resources Without Limits or Throttling.
Which OpenEXR versions are affected?
Affected versions include releases prior to 3.3.3 across affected packages: OpenEXR.
What version fixes CVE-2025-48074?
Upgrading to 3.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is OpenEXR affected?
Yes, OpenEXR is affected in releases prior to 3.3.3. Upgrade your dependency to 3.3.3 or later.
What CWE is associated with CVE-2025-48074?
CVE-2025-48074 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check PyPI dependencies for CVE-2025-48074?
Run the dependency tree command: 'pip show OpenEXR'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x22w-82jp-8rvf",
  "modified" : "2026-06-11T14:09:44Z",
  "published" : "2025-07-31T19:23:18Z",
  "aliases" : [ "CVE-2025-48074" ],
  "summary" : "OpenEXR Out-Of-Memory via Unbounded File Header Values",
  "details" : "### Summary\nThe OpenEXR file format defines many information about the final image inside of the file header, such as the size of data/display window.\n\nThe application trusts the value of `dataWindow` size provided in the header of the input file, and performs computations based on this value.\n\nThis may result in unintended behaviors, such as excessively large number of iterations and/or huge memory allocations.\n\n\n### Details\nA concrete example of this issue is present in the function `readScanline()` in `ImfCheckFile.cpp` at line 235, that performs a for-loop using the `dataWindow min.y` and `max.y` coordinates that can be arbitrarily large.\n\n```cpp\nin.setFrameBuffer (i);\n\nint step = 1;\n\n//\n// try reading scanlines. Continue reading scanlines\n// even if an exception is encountered\n//\nfor (int y = dw.min.y; y <= dw.max.y; y += step) // <-- THIS LOOP IS EXCESSIVE BECAUSE OF DW.MAX\n{\n    try\n    {\n        in.readPixels (y);\n    }\n    catch (...)\n    {\n        threw = true;\n\n        //\n        // in reduceTime mode, fail immediately - the file is corrupt\n        //\n        if (reduceTime) { return threw; }\n    }\n}\n```\n\nAnother example occurs in the `EnvmapImage::resize` function that in turn calls `Array2D<T>::resizeEraseUnsafe` passing the `dataWindow` X and Y coordinates and perform a huge allocation.\n\nOn some system, the allocator will simply return `std::bad_alloc` and crash. On other systems such as macOS, the allocator will happily continue with a \"small\" pre-allocation and allocate further memory whenever it is accessed.\nThis is the case with the `EnvmapImage::clear` function that is called right after and fills the image RGB values with zeros, allocating tens of Gigabytes.\n\n### PoC\n\nNOTE: please download the `oom_crash.exr` file via the following link:\n \nhttps://github.com/ShielderSec/poc/tree/main/CVE-2025-48074\n\n1. Compile the `exrcheck` binary in a macOS or GNU/Linux machine with ASAN.\n2. Open the `oom_crash.exr` file with the following command:\n\n```\nexrcheck oom_crash.exr\n```\n\n3. Notice that `exrenvmap`/`exrcheck` crashes with ASAN stack-trace.\n\n### Impact\nAn attacker could cause a denial of service by stalling the application or exhaust memory by stalling the application in a loop which contains a memory leakage.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "OpenEXR"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.2"
      }, {
        "fixed" : "3.3.3"
      } ]
    } ],
    "versions" : [ "3.3.2" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-x22w-82jp-8rvf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48074"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr/commit/2df7802a6421bf39ed73a607392f01b3c6da4e4a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ShielderSec/poc/tree/main/CVE-2025-48074"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-31T19:23:18Z",
    "nvd_published_at" : "2025-08-01T17:15:52Z"
  }
}