FFmpeg Stack-Based Buffer Overflow Vulnerability in AAC Encoder TNS Function

Vulnerability

A critical stack-based buffer overflow vulnerability has been identified in FFmpeg versions prior to 7.1. The issue arises in the AAC Encoder component, specifically within the 'ff_aac_search_for_tns' function in 'libavcodec/aacenc_tns.c'. This vulnerability can be exploited remotely, leading to potential arbitrary code execution.

Impact

Exploitation of this vulnerability causes a stack-based buffer overflow, which can lead to arbitrary code execution.

Reproduction

The vulnerability can be reproduced by encoding an audio stream using the FFmpeg AAC encoder with a crafted input that triggers the buffer overflow. This can be done using the FFmpeg command-line tool, specifying the AAC encoder and the appropriate input file that exploits the vulnerability.

Remediation

Users are advised to upgrade to FFmpeg version 7.1 or later.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM