# CVE-2026-26981: OpenEXR has heap-buffer-overflow via signed integer underflow in ImfContextInit.cpp

> A signed integer underflow in OpenEXR leads to a heap buffer overflow when parsing malformed files, potentially causing crashes or data exposure.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 24 Feb 2026
- **Updated:** 24 Feb 2026
- **Also known as:** GHSA-q6vj-wxvf-5m8c, JLSEC-2026-140, PYSEC-2026-2849, openSUSE-SU-2026:10272-1

## What is CVE-2026-26981?

CVE-2026-26981 is a medium-severity vulnerability in Openexr Openexr, published on 24 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official 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.0 through 3.3.6 and 3.4.0 through 3.4.4, a heap-buffer-overflow (OOB read) occurs in the `istream_nonparallel_read` function in `ImfContextInit.cpp` when parsing a malformed EXR file through a memory-mapped `IStream`. A signed integer subtraction produces a negative value that is implicitly converted to `size_t`, resulting in a massive length being passed to `memcpy`. Versions 3.3.7 and 3.4.5 contain a patch.

Weakness: CWE-195 (Signed to Unsigned Conversion Error)

## Which versions are affected by CVE-2026-26981?

5 open source packages ship an affected version, including openexr and OpenEXR. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openexr` | PyPI | From 3.3.0 | 3.3.7, 3.4.5 |
| `openexr` | PyPI | From 3.3.0 | 3.3.7 |
| `openexr` | PyPI | From 3.4.0 | 3.4.5 |
| `OpenEXR` | PyPI | From 3.3.0 | 3.3.7 |
| `OpenEXR` | PyPI | From 3.4.0 | 3.4.5 |
| `openexr` | openSUSE:Tumbleweed | All versions | 3.4.5-1.1 |

Products: Openexr Openexr.

## How do I fix CVE-2026-26981?

Upgrade openexr to a fixed version for your release line: 3.3.7 or 3.4.5.

## Is CVE-2026-26981 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26981 exists.

## Other vulnerabilities in Openexr Openexr

- [CVE-2023-5841](https://insights.sbomify.com/CVE-2023-5841/): OpenEXR Heap Overflow in Scanline Deep Data Parsing (critical 9.1)
- [CVE-2026-41142](https://insights.sbomify.com/CVE-2026-41142/): OpenEXR is Vulnerable to Integer overflow in ImageChannel::resize leads to heap OOB write via OpenEXRUtil public API (high 8.8)
- [CVE-2026-42216](https://insights.sbomify.com/CVE-2026-42216/): OpenEXR: Out-of-bounds read in `IDManifest::init()` during prefix expansion (high 8.8)
- [CVE-2017-9111](https://insights.sbomify.com/CVE-2017-9111/): OpenEXR invalid write (high 8.8)
- [CVE-2017-9113](https://insights.sbomify.com/CVE-2017-9113/): Memory corruption in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-26981 and fix it if it is affected.

What it is: CVE-2026-26981 is a medium-severity vulnerability in Openexr Openexr, published on 24 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26981 exists.

Affected packages and fixed versions:
- openexr (PyPI): affected from 3.3.0; fixed in 3.3.7, 3.4.5
- openexr (PyPI): affected from 3.3.0; fixed in 3.3.7
- openexr (PyPI): affected from 3.4.0; fixed in 3.4.5
- OpenEXR (PyPI): affected from 3.3.0; fixed in 3.3.7
- OpenEXR (PyPI): affected from 3.4.0; fixed in 3.4.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-26981/ (Markdown: https://insights.sbomify.com/CVE-2026-26981/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-26981
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-26981
- OSV: https://osv.dev/vulnerability/CVE-2026-26981

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-26981/
Summaries are generated and may contain mistakes; the official description above is the record.
