CVE-2025-59733
JSON

8.7high

Heap-buffer-overflow write in FFmpeg EXR dwa_uncompress

Severity
8.7high CVSS:4.0 by Google
Exploit likelihood
0.18% (higher than 8% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Google

Description

When decoding an OpenEXR file that uses DWAA or DWAB compression, there's an implicit assumption that all image channels have the same pixel type (and size), and that if there are four channels, the first four are "B", "G", "R" and "A". The channel parsing code can be found in decode_header. The buffer td->uncompressed_data is allocated in decode_block based on the xsize, ysize and computed current_channel_offset. The function dwa_uncompress then assumes at [5] that if there are 4 channels, these are "B", "G", "R" and "A", and in the calculations at [6] and [7] that all channels are of the same type, which matches the type of the main color channels. If we set the main color channels to a 4-byte type and add duplicate or unknown channels of the 2-byte EXR_HALF type, then the addition at [7] will increment the pointer by 4-bytes * xsize * nb_channels, which will exceed the allocated buffer. We recommend upgrading to version 8.0 or beyond.

Affected

Product or packageVersionsReported by
EXRfrom 9a32b863074ed4140141e0d3613905c6f1fe61c5 before 8.0, from 7.1.1 before 8.0CVE List

Classification

CWE-787

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

When decoding an OpenEXR file that uses DWAA or DWAB compression, there's an implicit assumption that all image channels have the same pixel type (and size), and that if there are four channels, the first four are "B", "G", "R" and "A". The channel parsing code can be found in decode_header. The buffer td->uncompressed_data is allocated in decode_block based on the xsize, ysize and computed current_channel_offset. The function dwa_uncompress then assumes at [5] that if there are 4 channels, these are "B", "G", "R" and "A", and in the calculations at [6] and [7] that all channels are of the same type, which matches the type of the main color channels. If we set the main color channels to a 4-byte type and add duplicate or unknown channels of the 2-byte EXR_HALF type, then the addition at [7] will increment the pointer by 4-bytes * xsize * nb_channels, which will exceed the allocated buffer. We recommend upgrading to version 8.0 or beyond.

NVD (es)

Al decodificar un archivo OpenEXR que utiliza compresión DWAA o DWAB, existe una suposición implícita de que todos los canales de imagen tienen el mismo tipo de píxel (y tamaño), y de que si hay cuatro canales, los primeros cuatro son 'B', 'G', 'R' y 'A'. El código de análisis de canales se encuentra en decode_header. El búfer td -> uncompressed_data se asigna en decode_block basándose en xsize, ysize y el current_channel_offset calculado. La función dwa_uncompress entonces asume en [5] que si hay 4 canales, estos son 'B', 'G', 'R' y 'A', y en los cálculos en [6] y [7] que todos los canales son del mismo tipo, lo que coincide con el tipo de los canales de color principales. Si configuramos los canales de color principales a un tipo de 4 bytes y añadimos canales duplicados o desconocidos del tipo EXR_HALF de 2 bytes, entonces la suma en [7] incrementará el puntero en 4 bytes * xsize * nb_channels, lo que excederá el búfer asignado. Recomendamos actualizar a la versión 8.0 o posterior.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-59733 changed 2026-02-26CVE Terms of Use
NVDCVE-2025-59733 changed 2026-10-19Public domain