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
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 package | Versions | Reported by |
|---|---|---|
| SANM | from 829680f96a7a7ff02d1543895ec0fb713309d5c0 before 8.0 | CVE List |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-59730 changed 2025-10-06 | CVE Terms of Use |
| NVD | CVE-2025-59730 changed 2026-10-19 | Public domain |