CVE-2025-48073: OpenEXR ScanLineProcess :run_fill NULL Pointer Write Vulnerability

MODERATE
Advisory Identifier: GHSA-qhpm-86v7-phmm
CWE-476
Published
Advisory Summary

CVE-2025-48073 is a MODERATE :run_fill null pointer write vulnerability (CWE-476: NULL Pointer Dereference) affecting OpenEXR ScanLineProcess libraries in the PyPI ecosystem. The issue involves :run_fill null pointer write in "reducememory" mode. Remediation is available by upgrading affected packages to version 3.3.3.

CVE-2025-48073 at a Glance

CVE Identifier CVE-2025-48073
GHSA Identifier GHSA-qhpm-86v7-phmm
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product OpenEXR ScanLineProcess
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-48073

To remediate this vulnerability, upgrade all affected OpenEXR ScanLineProcess 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-48073, inspect your installed packages using pip:

pip show OpenEXR

Analyze the terminal output to locate any version of OpenEXR ScanLineProcess 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-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In OpenEXR ScanLineProcess, 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 When reading a deep scanline image with a large sample count in `reduceMemory` mode, it is possible to crash a target application with a NULL pointer dereference in a write operation. ### Details In the `ScanLineProcess::run_fill` function, implemented in `src/lib/OpenEXR/ImfDeepScanLineInputFile.cpp`, the following code is used to write the `fillValue` in the sample buffer: ```cpp switch (fills.type) { case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT: { unsigned int fillVal = (unsigned int) (fills.fillValue); unsigned int* fillptr = static_cast<unsigned int*> (dest); for ( int32_t s = 0; s < samps; ++s ) fillptr[s] = fillVal; // <--- POTENTIAL CRASH HERE break; } ``` However, when `reduceMemory` mode is enabled in the `readDeepScanLine` function in `src/lib/OpenEXRUtil/ImfCheckFile.cpp`, with large sample counts, the sample data will not be read, as shown below: ```cpp // limit total number of samples read in reduceMemory mode // if (!reduceMemory || fileBufferSize + bufferSize < gMaxBytesPerDeepScanline) // <--- CHECK ON LARGE SAMPLE COUNTS AND reduceMemory { // SNIP... try { in.readPixels (y); } ``` Therefore, in those cases, the sample buffer would not be allocated, resulting in a potential write operation on a NULL pointer. ### PoC NOTE: please download the `runfill_crash.exr` file from the following link: https://github.com/ShielderSec/poc/tree/main/CVE-2025-48073 1. Compile the `exrcheck` binary in a macOS or GNU/Linux machine with ASAN. 2. Open the `runfill_crash.exr` file with the following command: ``` exrcheck -m runfill_crash.exr ``` 3. Notice that `exrcheck` crashes with ASAN stack-trace. ### Impact An attacker may cause a denial of service by crashing the application.

CVE-2025-48073 Affected OpenEXR ScanLineProcess 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-48073?
CVE-2025-48073 is a security vulnerability in OpenEXR ScanLineProcess involving :run_fill NULL Pointer Write In "reduceMemory" Mode under CWE-476: NULL Pointer Dereference.
Which OpenEXR ScanLineProcess versions are affected?
Affected versions include releases prior to 3.3.3 across affected packages: OpenEXR.
What version fixes CVE-2025-48073?
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-48073?
CVE-2025-48073 is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check PyPI dependencies for CVE-2025-48073?
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-qhpm-86v7-phmm",
  "modified" : "2025-08-01T13:29:06Z",
  "published" : "2025-07-31T19:21:35Z",
  "aliases" : [ "CVE-2025-48073" ],
  "summary" : "OpenEXR ScanLineProcess::run_fill NULL Pointer Write In \"reduceMemory\" Mode",
  "details" : "### Summary\n\nWhen reading a deep scanline image with a large sample count in `reduceMemory` mode, it is possible to crash a target application with a NULL pointer dereference in a write operation.\n\n### Details\n\nIn the `ScanLineProcess::run_fill` function, implemented in `src/lib/OpenEXR/ImfDeepScanLineInputFile.cpp`, the following code is used to write the `fillValue` in the sample buffer:\n\n```cpp\n                switch (fills.type)\n                {\n                    case OPENEXR_IMF_INTERNAL_NAMESPACE::UINT:\n                    {\n                        unsigned int fillVal = (unsigned int) (fills.fillValue);\n                        unsigned int* fillptr = static_cast<unsigned int*> (dest);\n\n                        for ( int32_t s = 0; s < samps; ++s )\n                            fillptr[s] = fillVal; // <--- POTENTIAL CRASH HERE\n                        break;\n                    }\n```\n\nHowever, when `reduceMemory` mode is enabled in the `readDeepScanLine` function in `src/lib/OpenEXRUtil/ImfCheckFile.cpp`, with large sample counts, the sample data will not be read, as shown below:\n\n```cpp\n            // limit total number of samples read in reduceMemory mode\n            //\n            if (!reduceMemory ||\n                fileBufferSize + bufferSize < gMaxBytesPerDeepScanline) // <--- CHECK ON LARGE SAMPLE COUNTS AND reduceMemory\n            {\n            // SNIP...\n            try\n                {\n                    in.readPixels (y);\n                }\n```\n\nTherefore, in those cases, the sample buffer would not be allocated, resulting in a potential write operation on a NULL pointer.\n\n### PoC\n\nNOTE: please download the `runfill_crash.exr` file from the following link:\n \nhttps://github.com/ShielderSec/poc/tree/main/CVE-2025-48073\n\n1. Compile the `exrcheck` binary in a macOS or GNU/Linux machine with ASAN.\n2. Open the `runfill_crash.exr` file with the following command:\n\n```\nexrcheck -m runfill_crash.exr\n```\n\n3. Notice that `exrcheck` crashes with ASAN stack-trace.\n\n### Impact\nAn attacker may cause a denial of service by crashing the application.",
  "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-qhpm-86v7-phmm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48073"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ShielderSec/poc/tree/main/CVE-2025-48073"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-31T19:21:35Z",
    "nvd_published_at" : "2025-07-31T21:15:28Z"
  }
}