CVE-2025-59730
JSON

5.7medium

Heap-buffer-overflow write in FFmpeg SANM decoding due to lack of bounds-checking in old_codec48

Severity
5.7medium CVSS:4.0 by Google
Exploit likelihood
0.16% (higher than 5% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Google

Description

When decoding a frame for a SANM file (ANIM v0 variant), the decoded data can be larger than the buffer allocated for it. Frames encoded with codec 48 can specify their resolution (width x height). A buffer of appropriate size is allocated depending on the resolution. This codec can encode the frame contents using a run-length encoding algorithm. There are no checks that the decoded frame fits in the allocated buffer, leading to a heap-buffer-overflow. process_frame_obj initializes the buffers based on the frame resolution: We recommend upgrading to version 8.0 or beyond.

Affected

Product or packageVersionsReported by
SANMfrom 829680f96a7a7ff02d1543895ec0fb713309d5c0 before 8.0CVE List

Classification

CWE-787

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

What each source says

CVE List

When decoding a frame for a SANM file (ANIM v0 variant), the decoded data can be larger than the buffer allocated for it. Frames encoded with codec 48 can specify their resolution (width x height). A buffer of appropriate size is allocated depending on the resolution. This codec can encode the frame contents using a run-length encoding algorithm. There are no checks that the decoded frame fits in the allocated buffer, leading to a heap-buffer-overflow. process_frame_obj initializes the buffers based on the frame resolution: We recommend upgrading to version 8.0 or beyond.

NVD (es)

Al decodificar un fotograma para un archivo SANM (variante ANIM v0), los datos decodificados pueden ser mayores que el búfer asignado para ellos. Los fotogramas codificados con el códec 48 pueden especificar su resolución (ancho x alto). Se asigna un búfer de tamaño apropiado dependiendo de la resolución. Este códec puede codificar el contenido del fotograma utilizando un algoritmo de codificación por longitud de ejecución. No hay comprobaciones de que el fotograma decodificado quepa en el búfer asignado, lo que lleva a un desbordamiento de búfer de montón. process_frame_obj inicializa los búferes basándose en la resolución del fotograma: Recomendamos actualizar a la versión 8.0 o posterior.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-59730 changed 2025-10-06CVE Terms of Use
NVDCVE-2025-59730 changed 2026-10-19Public domain