The vulnerability is a classic heap-based buffer overflow within the OpenEXR library, specifically when handling ZIPS-compressed deep scanline EXR files. The core of the issue lies in the undo_zip_impl function located in src/lib/OpenEXRCore/internal_zip.c. An attacker can craft an EXR file with a forged chunk header, specifying a small unpacked_size. When the library processes this file, it allocates a buffer based on this small, untrusted size. However, the actual decompressed data is larger. The undo_zip_impl function, prior to the patch, failed to validate that the actual decompressed size (actual_out_bytes) did not exceed the allocated buffer size (uncompressed_size). This leads to internal_zip_reconstruct_bytes being called with a size parameter larger than the destination buffer, resulting in a heap overflow. The fix, as seen in commit 916cc729e24aa16b86d82813f6e136340ab2876f, introduces the necessary check. During exploitation, a profiler would show undo_zip_impl in the call stack, which then calls internal_zip_reconstruct_bytes where the memory corruption occurs.